MCPcopy Create free account
hub / github.com/PX4/eigen / setrand_eigen_google_sparse

Function setrand_eigen_google_sparse

bench/sparse_setter.cpp:284–295  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284EIGEN_DONT_INLINE Scalar* setrand_eigen_google_sparse(const Coordinates& coords, const Values& vals)
285{
286 using namespace Eigen;
287 SparseMatrix<Scalar> mat(SIZE,SIZE);
288 {
289 RandomSetter<SparseMatrix<Scalar>, GoogleSparseHashMapTraits> setter(mat);
290 for (int i=0; i<coords.size(); ++i)
291 setter(coords[i].x(), coords[i].y()) += vals[i];
292 CHECK_MEM;
293 }
294 return &mat.coeffRef(coords[0].x(), coords[0].y());
295}
296#endif
297
298

Callers 1

mainFunction · 0.85

Calls 4

sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45
coeffRefMethod · 0.45

Tested by

no test coverage detected