From 324ef54fe05d3798e035cd115cee5c419185cee3 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Thu, 3 Nov 2011 16:58:02 +0100 Subject: [PATCH] - changed non const access operator of class template CRSMatrix - added interface for erasing enties from the matrix (implemented asap) - added interface for getting a column of the matrix (implemented asap) --- MathLib/LinAlg/Sparse/CRSMatrix.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/MathLib/LinAlg/Sparse/CRSMatrix.h b/MathLib/LinAlg/Sparse/CRSMatrix.h index 87d2a202681..ba7042f5122 100644 --- a/MathLib/LinAlg/Sparse/CRSMatrix.h +++ b/MathLib/LinAlg/Sparse/CRSMatrix.h @@ -73,7 +73,7 @@ public: * @param col the column number * @return The corresponding matrix entry. */ - FP_TYPE const& operator() (IDX_TYPE row, IDX_TYPE col) const + FP_TYPE operator() (IDX_TYPE row, IDX_TYPE col) const { assert(0 <= row && row < MatrixBase::_n_rows); @@ -87,6 +87,7 @@ public: } j++; } + return 0.0; } /** @@ -112,6 +113,22 @@ public: } } + void eraseEntries (IDX_TYPE n_entries, IDX_TYPE* rows, IDX_TYPE *cols) + { + // ToDo + //*** determine the number of new entries + unsigned cnt_new_entries(_row_ptr[MatrixBase::_n_rows]); + + //*** create new memory + //*** copy the entries + //*** apply changes to attributes + } + + void getColumn(IDX_TYPE col, FP_TYPE* column_entries) + { + // ToDo + } + protected: IDX_TYPE *_row_ptr; IDX_TYPE *_col_idx; -- GitLab