fix: renames FloatExt to RealNumber
This commit is contained in:
+4
-4
@@ -1,11 +1,11 @@
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
use crate::linalg::BaseMatrix;
|
||||
use crate::math::num::FloatExt;
|
||||
use crate::math::num::RealNumber;
|
||||
use std::fmt::Debug;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SVD<T: FloatExt, M: SVDDecomposableMatrix<T>> {
|
||||
pub struct SVD<T: RealNumber, M: SVDDecomposableMatrix<T>> {
|
||||
pub U: M,
|
||||
pub V: M,
|
||||
pub s: Vec<T>,
|
||||
@@ -15,7 +15,7 @@ pub struct SVD<T: FloatExt, M: SVDDecomposableMatrix<T>> {
|
||||
tol: T,
|
||||
}
|
||||
|
||||
pub trait SVDDecomposableMatrix<T: FloatExt>: BaseMatrix<T> {
|
||||
pub trait SVDDecomposableMatrix<T: RealNumber>: BaseMatrix<T> {
|
||||
fn svd_solve_mut(self, b: Self) -> Self {
|
||||
self.svd_mut().solve(b)
|
||||
}
|
||||
@@ -367,7 +367,7 @@ pub trait SVDDecomposableMatrix<T: FloatExt>: BaseMatrix<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: FloatExt, M: SVDDecomposableMatrix<T>> SVD<T, M> {
|
||||
impl<T: RealNumber, M: SVDDecomposableMatrix<T>> SVD<T, M> {
|
||||
pub fn new(U: M, V: M, s: Vec<T>) -> SVD<T, M> {
|
||||
let m = U.shape().0;
|
||||
let n = V.shape().0;
|
||||
|
||||
Reference in New Issue
Block a user