MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / sum

Method sum

dependency/densecrf/include/Eigen/src/SparseCore/SparseRedux.h:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14
15template<typename Derived>
16typename internal::traits<Derived>::Scalar
17SparseMatrixBase<Derived>::sum() const
18{
19 eigen_assert(rows()>0 && cols()>0 && "you are using a non initialized matrix");
20 Scalar res(0);
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)
24 res += iter.value();
25 return res;
26}
27
28template<typename _Scalar, int _Options, typename _Index>
29typename internal::traits<SparseMatrix<_Scalar,_Options,_Index> >::Scalar

Callers 3

permute_symm_to_fullsymmFunction · 0.45
nonZerosMethod · 0.45
squaredNormMethod · 0.45

Calls 8

MapFunction · 0.70
rowsFunction · 0.50
colsFunction · 0.50
outerSizeFunction · 0.50
valueMethod · 0.45
isCompressedMethod · 0.45
valuePtrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected