pub struct Faer;Trait Implementations§
Source§impl<T> Eig<T> for Faer
impl<T> Eig<T> for Faer
Source§fn eig<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
fn eig<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
Compute eigenvalues and right eigenvectors with new allocated matrices
The matrix A satisfies: A * v = λ * v where v are the right eigenvectors
Source§fn eig_values<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
fn eig_values<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
Compute only eigenvalues with new allocated vectors
Source§fn eigh<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
fn eigh<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
Compute eigenvalues and eigenvectors of a Hermitian matrix (input should be complex)
Source§fn eigs<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
fn eigs<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> EigResult<T>
Compute eigenvalues and eigenvectors of a symmetric matrix (input should be real)
Source§fn schur<L: Layout>(&self, _a: &mut DSlice<T, 2, L>) -> SchurResult<T>
fn schur<L: Layout>(&self, _a: &mut DSlice<T, 2, L>) -> SchurResult<T>
Compute Schur decomposition with new allocated matrices
Source§fn schur_overwrite<L: Layout>(
&self,
_a: &mut DSlice<T, 2, L>,
_t: &mut DSlice<T, 2, Dense>,
_z: &mut DSlice<T, 2, Dense>,
) -> Result<(), SchurError>
fn schur_overwrite<L: Layout>( &self, _a: &mut DSlice<T, 2, L>, _t: &mut DSlice<T, 2, Dense>, _z: &mut DSlice<T, 2, Dense>, ) -> Result<(), SchurError>
Compute Schur decomposition overwriting existing matrices
Source§fn schur_complex<L: Layout>(&self, _a: &mut DSlice<T, 2, L>) -> SchurResult<T>
fn schur_complex<L: Layout>(&self, _a: &mut DSlice<T, 2, L>) -> SchurResult<T>
Compute Schur (complex) decomposition with new allocated matrices
Source§fn schur_complex_overwrite<L: Layout>(
&self,
_a: &mut DSlice<T, 2, L>,
_t: &mut DSlice<T, 2, Dense>,
_z: &mut DSlice<T, 2, Dense>,
) -> Result<(), SchurError>
fn schur_complex_overwrite<L: Layout>( &self, _a: &mut DSlice<T, 2, L>, _t: &mut DSlice<T, 2, Dense>, _z: &mut DSlice<T, 2, Dense>, ) -> Result<(), SchurError>
Compute Schur (complex) decomposition overwriting existing matrices
Source§fn eig_full<L: Layout>(
&self,
_a: &mut DSlice<T, 2, L>,
) -> Result<EigDecomp<T>, EigError>
fn eig_full<L: Layout>( &self, _a: &mut DSlice<T, 2, L>, ) -> Result<EigDecomp<T>, EigError>
A * vr = λ * vr and vl^H * A = λ * vl^H
where vr are right eigenvectors and vl are left eigenvectorsSource§impl<T> LU<T> for Faer
impl<T> LU<T> for Faer
Source§fn lu<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> (DTensor<T, 2>, DTensor<T, 2>, DTensor<T, 2>)
fn lu<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> (DTensor<T, 2>, DTensor<T, 2>, DTensor<T, 2>)
Computes LU decomposition with new allocated matrices: L, U, P (permutation matrix)
Source§fn lu_overwrite<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
l: &mut DSlice<T, 2, Ll>,
u: &mut DSlice<T, 2, Lu>,
p: &mut DSlice<T, 2, Lp>,
)
fn lu_overwrite<L: Layout, Ll: Layout, Lu: Layout, Lp: Layout>( &self, a: &mut DSlice<T, 2, L>, l: &mut DSlice<T, 2, Ll>, u: &mut DSlice<T, 2, Lu>, p: &mut DSlice<T, 2, Lp>, )
Computes LU decomposition overwriting existing matrices
Source§fn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>
fn inv<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> InvResult<T>
Computes inverse with new allocated matrix
Source§fn inv_overwrite<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<(), InvError>
fn inv_overwrite<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<(), InvError>
Computes inverse overwriting the input matrix
Source§fn det<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> T
fn det<L: Layout>(&self, a: &mut DSlice<T, 2, L>) -> T
Computes the determinant of a square matrix. Panics if the matrix is non-square.
Source§impl<T> MatMul<T> for Faer
impl<T> MatMul<T> for Faer
Source§fn contract_all<'a, La, Lb>(
&self,
a: &'a Slice<T, DynRank, La>,
b: &'a Slice<T, DynRank, Lb>,
) -> impl ContractBuilder<'a, T, La, Lb>
fn contract_all<'a, La, Lb>( &self, a: &'a Slice<T, DynRank, La>, b: &'a Slice<T, DynRank, Lb>, ) -> impl ContractBuilder<'a, T, La, Lb>
Contracts all axes of the first tensor with all axes of the second tensor.
Source§fn contract_n<'a, La, Lb>(
&self,
a: &'a Slice<T, DynRank, La>,
b: &'a Slice<T, DynRank, Lb>,
n: usize,
) -> impl ContractBuilder<'a, T, La, Lb>
fn contract_n<'a, La, Lb>( &self, a: &'a Slice<T, DynRank, La>, b: &'a Slice<T, DynRank, Lb>, n: usize, ) -> impl ContractBuilder<'a, T, La, Lb>
Contracts the last n axes of the first tensor with the first n axes of the second tensor.
§Example
For two matrices (2D tensors), contract_n(1) performs standard matrix multiplication.
Source§fn contract<'a, La, Lb>(
&self,
a: &'a Slice<T, DynRank, La>,
b: &'a Slice<T, DynRank, Lb>,
axes_a: impl Into<Box<[usize]>>,
axes_b: impl Into<Box<[usize]>>,
) -> impl ContractBuilder<'a, T, La, Lb>
fn contract<'a, La, Lb>( &self, a: &'a Slice<T, DynRank, La>, b: &'a Slice<T, DynRank, Lb>, axes_a: impl Into<Box<[usize]>>, axes_b: impl Into<Box<[usize]>>, ) -> impl ContractBuilder<'a, T, La, Lb>
Specifies exactly which axes to contract_all.
§Example
specific([1, 2], [3, 4]) contracts axis 1 and 2 of a
with axes 3 and 4 of b.
fn matmul<'a, La, Lb>( &self, a: &'a DSlice<T, 2, La>, b: &'a DSlice<T, 2, Lb>, ) -> impl MatMulBuilder<'a, T, La, Lb>
Source§impl<T> QR<T> for Faer
impl<T> QR<T> for Faer
Source§impl<T> SVD<T> for Faer
impl<T> SVD<T> for Faer
Source§fn svd<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<SVDDecomp<T>, SVDError>
fn svd<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<SVDDecomp<T>, SVDError>
Compute full SVD with new allocated matrices
Source§fn svd_s<L: Layout>(
&self,
a: &mut DSlice<T, 2, L>,
) -> Result<DTensor<T, 2>, SVDError>
fn svd_s<L: Layout>( &self, a: &mut DSlice<T, 2, L>, ) -> Result<DTensor<T, 2>, SVDError>
Compute only singular values with new allocated matrix
Source§impl<T> Solve<T> for Faer
impl<T> Solve<T> for Faer
Source§fn solve<La: Layout, Lb: Layout>(
&self,
a: &mut DSlice<T, 2, La>,
b: &DSlice<T, 2, Lb>,
) -> SolveResultType<T>
fn solve<La: Layout, Lb: Layout>( &self, a: &mut DSlice<T, 2, La>, b: &DSlice<T, 2, Lb>, ) -> SolveResultType<T>
Solves linear system AX = B with new allocated solution matrix A is modified (overwritten with LU decomposition) Returns the solution X and P the permutation matrix (identity in that case), or error
Source§fn solve_overwrite<La: Layout, Lb: Layout, Lp: Layout>(
&self,
a: &mut DSlice<T, 2, La>,
b: &mut DSlice<T, 2, Lb>,
p: &mut DSlice<T, 2, Lp>,
) -> Result<(), SolveError>
fn solve_overwrite<La: Layout, Lb: Layout, Lp: Layout>( &self, a: &mut DSlice<T, 2, La>, b: &mut DSlice<T, 2, Lb>, p: &mut DSlice<T, 2, Lp>, ) -> Result<(), SolveError>
Solves linear system AX = b overwriting existing matrices A is overwritten with its LU decomposition B is overwritten with the solution X P is filled with the permutation matrix such that PA = LU (here P = identity) Returns Ok(()) on success, Err(SolveError) on failure
Auto Trait Implementations§
impl Freeze for Faer
impl RefUnwindSafe for Faer
impl Send for Faer
impl Sync for Faer
impl Unpin for Faer
impl UnwindSafe for Faer
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
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoCloned<T> for T
impl<T> IntoCloned<T> for T
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>
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>
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