LinSolveRing

Trait LinSolveRing 

Source
pub trait LinSolveRing: DivisibilityRing {
    // Required method
    fn solve_right<V1, V2, V3, A>(
        &self,
        lhs: SubmatrixMut<'_, V1, Self::Element>,
        rhs: SubmatrixMut<'_, V2, Self::Element>,
        out: SubmatrixMut<'_, V3, Self::Element>,
        allocator: A,
    ) -> SolveResult
       where V1: AsPointerToSlice<Self::Element>,
             V2: AsPointerToSlice<Self::Element>,
             V3: AsPointerToSlice<Self::Element>,
             A: Allocator;
}
Expand description

Class for rings over which we can solve linear systems.

Required Methods§

Source

fn solve_right<V1, V2, V3, A>( &self, lhs: SubmatrixMut<'_, V1, Self::Element>, rhs: SubmatrixMut<'_, V2, Self::Element>, out: SubmatrixMut<'_, V3, Self::Element>, allocator: A, ) -> SolveResult
where V1: AsPointerToSlice<Self::Element>, V2: AsPointerToSlice<Self::Element>, V3: AsPointerToSlice<Self::Element>, A: Allocator,

Tries to find a matrix X such that lhs * X = rhs.

If a solution exists, it will be written to out. Otherwise, out will have an unspecified (but valid) value after the function returns. Similarly, lhs and rhs will be modified in an unspecified way, but its entries will always be valid ring elements.

Note that if a solution is found, either SolveResult::FoundSomeSolution or SolveResult::FoundUniqueSolution are returned. If there are multiple solutions, only former will be returned. However, implementations are free to also return SolveResult::FoundSomeSolution in cases where there is a unique solution.

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.

Implementors§

Source§

impl<R, V, A_ring, C_ring> LinSolveRing for FreeAlgebraImplBase<R, V, A_ring, C_ring>
where R: RingStore, R::Type: LinSolveRing, V: VectorView<El<R>>, A_ring: Allocator + Clone, C_ring: ConvolutionAlgorithm<R::Type>,

Source§

impl<R: ?Sized + PrincipalIdealRing> LinSolveRing for R