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

Function vectorVectorToDenseMatrix

src/utilities.cpp:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54DenseMatrix vectorVectorToDenseMatrix(const std::vector<std::vector<double>> &vec)
55{
56 size_t numRows = vec.size();
57 size_t numCols = numRows > 0 ? vec.at(0).size() : 0;
58
59 DenseMatrix mat(numRows, numCols);
60
61 for(size_t i = 0; i < numRows; ++i)
62 {
63 for(size_t j = 0; j < numCols; ++j)
64 {
65 mat(i, j) = vec.at(i).at(j);
66 }
67 }
68
69 return mat;
70}
71
72std::vector<double> linspace(double start, double stop, unsigned int num)
73{

Callers 2

utilities.cppFile · 0.85
evalHessianMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected