pub struct NdarrayFaerBackend;Expand description
The default backend using the faer crate for linear algebra operations.
This is a zero-sized type intended for use as a type parameter on
algorithms that are generic over Backend:
ⓘ
fn my_algorithm<B: Backend>(data: &Array2<f64>) -> FerroResult<Array1<f64>> {
let (u, s, vt) = B::svd(data)?;
// ...
}
// Use the default backend:
my_algorithm::<NdarrayFaerBackend>(&data)?;Trait Implementations§
Source§impl Backend for NdarrayFaerBackend
impl Backend for NdarrayFaerBackend
Source§fn gemm(a: &Array2<f64>, b: &Array2<f64>) -> FerroResult<Array2<f64>>
fn gemm(a: &Array2<f64>, b: &Array2<f64>) -> FerroResult<Array2<f64>>
General matrix multiply:
C = A * B. Read moreSource§fn svd(a: &Array2<f64>) -> FerroResult<(Array2<f64>, Array1<f64>, Array2<f64>)>
fn svd(a: &Array2<f64>) -> FerroResult<(Array2<f64>, Array1<f64>, Array2<f64>)>
Singular Value Decomposition:
A = U * diag(S) * Vt. Read moreSource§fn qr(a: &Array2<f64>) -> FerroResult<(Array2<f64>, Array2<f64>)>
fn qr(a: &Array2<f64>) -> FerroResult<(Array2<f64>, Array2<f64>)>
QR decomposition:
A = Q * R. Read moreSource§fn cholesky(a: &Array2<f64>) -> FerroResult<Array2<f64>>
fn cholesky(a: &Array2<f64>) -> FerroResult<Array2<f64>>
Cholesky decomposition:
A = L * L^T (lower triangular). Read moreSource§fn solve(a: &Array2<f64>, b: &Array1<f64>) -> FerroResult<Array1<f64>>
fn solve(a: &Array2<f64>, b: &Array1<f64>) -> FerroResult<Array1<f64>>
Solve linear system:
A * x = b. Read moreAuto Trait Implementations§
impl Freeze for NdarrayFaerBackend
impl RefUnwindSafe for NdarrayFaerBackend
impl Send for NdarrayFaerBackend
impl Sync for NdarrayFaerBackend
impl Unpin for NdarrayFaerBackend
impl UnsafeUnpin for NdarrayFaerBackend
impl UnwindSafe for NdarrayFaerBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more