diff --git a/dune/matrix-vector/singlenonzerocolumnmatrix.hh b/dune/matrix-vector/singlenonzerocolumnmatrix.hh index 670b7a5aff71a7adbcc08714c621f79401d4d455..e6d1432cd0b14c22885077b2b06b848a7ba90f80 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); } + */ }; };