Adds SVD solver, code refactoring
This commit is contained in:
+3
-1
@@ -2,12 +2,14 @@ use std::ops::Range;
|
||||
|
||||
pub mod naive;
|
||||
|
||||
pub trait Matrix: Into<Vec<f64>>{
|
||||
pub trait Matrix: Into<Vec<f64>> + Clone{
|
||||
|
||||
fn get(&self, row: usize, col: usize) -> f64;
|
||||
|
||||
fn qr_solve_mut(&mut self, b: Self) -> Self;
|
||||
|
||||
fn svd_solve_mut(&mut self, b: Self) -> Self;
|
||||
|
||||
fn zeros(nrows: usize, ncols: usize) -> Self;
|
||||
|
||||
fn ones(nrows: usize, ncols: usize) -> Self;
|
||||
|
||||
Reference in New Issue
Block a user