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");
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");
static ConstMapType Map(const Scalar *data)
Definition PlainObjectBase.h:644
Index cols() const
Definition SparseMatrix.h:140
Scalar sum() const
Definition SparseRedux.h:30
Index rows() const
Definition SparseMatrix.h:138
bool isCompressed() const
Definition SparseCompressedBase.h:107
Scalar sum() const
Definition SparseRedux.h:41
Namespace containing all symbols from the Eigen library.
Definition Core:141
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74