tensor_rs/tensor_trait/
linalg.rs

1pub trait LinearAlgbra {
2    type TensorType;
3    type ElementType;
4
5    fn norm(&self) -> Self::TensorType;
6    /// Assuming the input is 2 dimensional array,
7    /// normalize_unit 
8    fn normalize_unit(&self) -> Self::TensorType;
9    fn lu(&self) -> Option<[Self::TensorType; 2]>;
10    fn lu_solve(&self, y: &Self::TensorType) -> Option<Self::TensorType>;
11    fn qr(&self) -> Option<[Self::TensorType; 2]>;
12    fn eigen(&self) -> Option<[Self::TensorType; 2]>;
13    fn cholesky(&self) -> Option<Self::TensorType>;
14    fn det(&self) -> Option<Self::TensorType>;
15    fn svd(&self) -> Option<[Self::TensorType; 3]>;
16    fn inv(&self) -> Option<Self::TensorType>;
17    fn pinv(&self) -> Self::TensorType;
18    fn tr(&self) -> Self::TensorType;
19}