MCPcopy Create free account
hub / github.com/Open-Quant/openquant / matrix_to_vec

Function matrix_to_vec

crates/openquant/src/structural_breaks.rs:333–343  ·  view source on GitHub ↗
(matrix: DMatrix<f64>)

Source from the content-addressed store, hash-verified

331}
332
333fn matrix_to_vec(matrix: DMatrix<f64>) -> Vec<Vec<f64>> {
334 let mut rows = Vec::with_capacity(matrix.nrows());
335 for i in 0..matrix.nrows() {
336 let mut row = Vec::with_capacity(matrix.ncols());
337 for j in 0..matrix.ncols() {
338 row.push(matrix[(i, j)]);
339 }
340 rows.push(row);
341 }
342 rows
343}
344use nalgebra::DMatrix;

Callers 1

_get_betasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected