10#ifndef EIGEN_SPARSEREDUX_H
11#define EIGEN_SPARSEREDUX_H
15template<
typename Derived>
16typename internal::traits<Derived>::Scalar
17SparseMatrixBase<Derived>::sum()
const
19 eigen_assert(rows()>0 && cols()>0 &&
"you are using a non initialized matrix");
21 internal::evaluator<Derived> thisEval(derived());
22 for (Index j=0; j<outerSize(); ++j)
23 for (
typename internal::evaluator<Derived>::InnerIterator iter(thisEval,j); iter; ++iter)
28template<
typename _Scalar,
int _Options,
typename _Index>
29typename internal::traits<SparseMatrix<_Scalar,_Options,_Index> >::Scalar
32 eigen_assert(rows()>0 && cols()>0 &&
"you are using a non initialized matrix");
33 if(this->isCompressed())
39template<
typename _Scalar,
int _Options,
typename _Index>
40typename internal::traits<SparseVector<_Scalar,_Options, _Index> >::Scalar
43 eigen_assert(rows()>0 && cols()>0 &&
"you are using a non initialized matrix");
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:180
A versatible sparse matrix representation.
Definition: SparseMatrix.h:98
a sparse vector class
Definition: SparseVector.h:66
Namespace containing all symbols from the Eigen library.
Definition: Core:141