MCPcopy Create free account
hub / github.com/bgrimstad/splinter / denseMatrixToVectorVector

Function denseMatrixToVectorVector

src/utilities.cpp:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39std::vector<std::vector<double>> denseMatrixToVectorVector(const DenseMatrix &mat)
40{
41 std::vector<std::vector<double>> vec(mat.rows());
42
43 for(size_t i = 0; i < (size_t) mat.rows(); ++i)
44 {
45 for(size_t j = 0; j < (size_t) mat.cols(); ++j)
46 {
47 vec.at(i).push_back(mat(i, j));
48 }
49 }
50
51 return vec;
52}
53
54DenseMatrix vectorVectorToDenseMatrix(const std::vector<std::vector<double>> &vec)
55{

Callers 3

utilities.cppFile · 0.85
evalHessianMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected