MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / CRSToMatrix

Function CRSToMatrix

src/VectorMath.cpp:55–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 void CRSToMatrix(const ceres::CRSMatrix &CRSMat, Matrix &Mat)
56 {
57 /** construct empty matrix */
58 Mat.resize(CRSMat.num_rows, CRSMat.num_cols);
59 Mat.setZero();
60
61 /** fill with sparse matrix */
62 for (int Row = 0; Row < CRSMat.num_rows; Row++)
63 {
64 int Start = CRSMat.rows[Row];
65 int End = CRSMat.rows[Row + 1];
66
67 for (int n = Start; n < End; n++)
68 {
69 int Col = CRSMat.cols[n];
70
71 Mat(Row, Col) = CRSMat.values[n];
72 }
73 }
74 }
75}

Callers 2

marginalizeStatesMethod · 0.85
EvaluateCostSurfaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected