From af9869d799b8f2f482175b93215ad744b62e6ecd Mon Sep 17 00:00:00 2001 From: Max Kahnt <max.kahnt@fu-berlin.de> Date: Mon, 15 Dec 2014 14:25:54 +0100 Subject: [PATCH] Several minor changes. Update docu. Remove outcommented lines. Add descriptive enums. Comment aut unusued matrix traits iterator methods. --- dune/matrix-vector/singlenonzerocolumnmatrix.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dune/matrix-vector/singlenonzerocolumnmatrix.hh b/dune/matrix-vector/singlenonzerocolumnmatrix.hh index 670b7a5..e6d1432 100644 --- a/dune/matrix-vector/singlenonzerocolumnmatrix.hh +++ b/dune/matrix-vector/singlenonzerocolumnmatrix.hh @@ -13,9 +13,7 @@ * \brief A static matrix that has only a single nonzero column * * The number and values of this column are dynamic. - * For simplicity this derives from FieldMatrix and sets - * all entries accordingly. So it will not reduce memory - * requirements but allows to implement methods more efficiently. + * \tparam Storage values of nonzero column are copied and hold in an array. Pass a const reference type to avoid this, e.g. FieldMatrix<K, 1, ROWS>. */ template<class K, int ROWS, int COLS, class Storage = Dune::array<K, ROWS> > class SingleNonZeroColumnMatrix @@ -53,7 +51,6 @@ public: typedef typename std::size_t size_type; typedef typename RowProxy::ConstIterator ConstColIterator; -// typedef typename Dune::FieldMatrix<K, ROWS, 1> SingleColumnMatrix; /** * \brief Create from single column matrix and column index @@ -97,7 +94,6 @@ public: const_row_reference operator[] (size_type rowIndex) const { -// return const_row_reference(&(nonZeroColumn_[rowIndex]), columnIndex_); return const_row_reference(&(static_cast<K&>(nonZeroColumn_[rowIndex])), columnIndex_); } @@ -120,9 +116,12 @@ namespace Arithmetic struct MatrixTraits<SingleNonZeroColumnMatrix<K, ROWS, COLS> > { enum { isMatrix = true }; - enum { sizeIsStatic = true }; + enum { isDense = false }; + enum { sizeIsStatic = true }; //TODO only one of these should be used + enum { hasStaticSize = true }; //TODO only one of these should be used enum { rows = ROWS}; enum { cols = COLS}; + /* typedef typename SingleNonZeroColumnMatrix<K, ROWS, COLS>::ConstColIterator ConstColIterator; static ConstColIterator rowBegin(const typename SingleNonZeroColumnMatrix<K, ROWS, COLS>::row_type& m, int row) @@ -136,6 +135,7 @@ namespace Arithmetic int nzCol = m.nonZeroColumnIndex(); return ConstColIterator(m[row][nzCol], nzCol+1); } + */ }; }; -- GitLab