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

Function eiToCSparse

bench/BenchSparseUtil.h:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99#include "cs.h"
100}
101void eiToCSparse(const EigenSparseMatrix& src, cs* &dst)
102{
103 cs* aux = cs_spalloc (0, 0, 1, 1, 1);
104 for (int j=0; j<src.cols(); ++j)
105 for (EigenSparseMatrix::InnerIterator it(src.derived(), j); it; ++it)
106 if (!cs_entry(aux, it.index(), j, it.value()))
107 {
108 std::cout << "cs_entry error\n";
109 exit(2);
110 }
111 dst = cs_compress(aux);
112// cs_spfree(aux);
113}
114#endif // CSPARSE
115
116#ifndef NOUBLAS

Callers 4

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 3

colsMethod · 0.45
indexMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected