(m: &DMatrix<f64>, idx: &[usize])
| 303 | } |
| 304 | |
| 305 | fn submatrix(m: &DMatrix<f64>, idx: &[usize]) -> DMatrix<f64> { |
| 306 | let n = idx.len(); |
| 307 | let mut out = DMatrix::zeros(n, n); |
| 308 | for (i, &ri) in idx.iter().enumerate() { |
| 309 | for (j, &cj) in idx.iter().enumerate() { |
| 310 | out[(i, j)] = m[(ri, cj)]; |
| 311 | } |
| 312 | } |
| 313 | out |
| 314 | } |
| 315 | |
| 316 | fn corr_to_distance(corr: &DMatrix<f64>) -> DMatrix<f64> { |
| 317 | let n = corr.nrows(); |
no test coverage detected