implemented subvector/submatrix with individual index selection

This commit is contained in:
2023-07-26 21:18:57 +02:00
parent 85a514a50e
commit 51a26337c6
6 changed files with 204 additions and 0 deletions

9
smat.h
View File

@@ -167,6 +167,15 @@ public:
void resize(const int n);
void dealloc(void) {resize(0);}
//! extract specified submatrix
const NRSMat submatrix(const int from, const int to) const;
const NRSMat submatrix(const NRVec<int> &selection) const;
//! store given matrix at given position into the current matrix
void storesubmatrix(const int from, const NRSMat &rhs);
void storesubmatrix(const NRVec<int> &selection, const NRSMat &rhs);
inline operator T*();
inline operator const T*() const;
void fprintf(FILE *f, const char *format, const int modulo) const;