Trait DeterminantInto

Source
pub trait DeterminantInto<A: Scalar>: Sized {
    // Required method
    fn sln_det_into(self) -> Result<(A, A::Real)>;

    // Provided method
    fn det_into(self) -> Result<A> { ... }
}
Expand description

An interface for calculating determinants of matrices.

Required Methodsยง

Source

fn sln_det_into(self) -> Result<(A, A::Real)>

Computes the (sign, natural_log) of the determinant of the matrix.

For real matrices, sign is 1, 0, or -1. For complex matrices, sign is 0 or a complex number with absolute value 1. The natural_log is the natural logarithm of the absolute value of the determinant. If the determinant is zero, sign is 0 and natural_log is negative infinity.

To obtain the determinant, you can compute sign * natural_log.exp() or just call .det_into() instead.

This method is more robust than .det() to very small or very large determinants since it returns the natural logarithm of the determinant rather than the determinant itself.

Provided Methodsยง

Source

fn det_into(self) -> Result<A>

Computes the determinant of the matrix.

Dyn Compatibilityยง

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Typesยง

Sourceยง

impl<A, S> DeterminantInto<A> for ArrayBase<S, Ix2>
where A: Scalar + Lapack, S: DataMut<Elem = A> + RawDataClone,

Sourceยง

fn sln_det_into(self) -> Result<(A, A::Real)>

Implementorsยง

Sourceยง

impl<A, S> DeterminantInto<A> for LUFactorized<S>
where A: Scalar + Lapack, S: Data<Elem = A> + RawDataClone,