fix: more refactoring
This commit is contained in:
@@ -366,12 +366,7 @@ impl BaseMatrix for DenseMatrix {
|
||||
|
||||
fn sub_element_mut(&mut self, row: usize, col: usize, x: f64) {
|
||||
self.values[col*self.nrows + row] -= x;
|
||||
}
|
||||
|
||||
fn generate_positive_definite(nrows: usize, ncols: usize) -> Self {
|
||||
let m = DenseMatrix::rand(nrows, ncols);
|
||||
m.dot(&m.transpose())
|
||||
}
|
||||
}
|
||||
|
||||
fn transpose(&self) -> Self {
|
||||
let mut m = DenseMatrix {
|
||||
@@ -723,11 +718,6 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn generate_positive_definite() {
|
||||
let m = DenseMatrix::generate_positive_definite(3, 3);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn reshape() {
|
||||
let m_orig = DenseMatrix::vector_from_array(&[1., 2., 3., 4., 5., 6.]);
|
||||
|
||||
Reference in New Issue
Block a user