pub trait FullPivLuScalar: BackendLinalgScalar {
// Required methods
fn solve_right_full_piv_lu(
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>;
fn solve_right_full_piv_lu_in(
context: &CpuExecutionContext,
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>;
fn solve_right_full_piv_lu_on_session(
session: &mut dyn Engine,
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>;
}Expand description
Scalar types that can solve T * P = Pi1 via a right full-pivoting LU
solve on the tenferro backend.
This is the foundational seam for matrix cross-interpolation (CI) materialization: it lets an algorithm layer ask for the backend’s full-pivot LU solve without depending on any higher crate. The four supported scalar types (f32, f64, Complex32, Complex64) are implemented here; the backend solves each in its own scalar type along its own kernel route, and this trait adds no promotion of its own.
§Errors
Returns an error when the pivot matrix is not square, the shapes are incompatible, or the backend solve fails.
Required Methods§
Sourcefn solve_right_full_piv_lu(
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>
fn solve_right_full_piv_lu( lhs_values: &[Self], lhs_rows: usize, lhs_cols: usize, pivot_values: &[Self], pivot_rows: usize, pivot_cols: usize, ) -> Result<Vec<Self>, BackendLinalgError>
Solve T * P = Pi1 for T, where P is the pivot matrix (column-major).
§Errors
Returns a BackendLinalgError when the pivot matrix is not square
(a shape mismatch), when the shapes are incompatible (lhs_cols != pivot_rows, a shape mismatch), or when the backend full-pivot LU solve
fails (a backend failure).
Sourcefn solve_right_full_piv_lu_in(
context: &CpuExecutionContext,
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>
fn solve_right_full_piv_lu_in( context: &CpuExecutionContext, lhs_values: &[Self], lhs_rows: usize, lhs_cols: usize, pivot_values: &[Self], pivot_rows: usize, pivot_cols: usize, ) -> Result<Vec<Self>, BackendLinalgError>
Same solve, in a caller-owned execution context.
The shapes and values are interpreted exactly as in
Self::solve_right_full_piv_lu; only the engine that performs the
solve is the caller’s, so the work runs on the caller’s backend instead
of the process-global one. The context is entered after the operands are
prepared and validated; a caller that must avoid an entry for a
degenerate input decides that before calling this method (the
materialization layer’s all-zero pivot shortcut is one such caller).
§Errors
Returns a BackendLinalgError when the pivot matrix is not square
(a shape mismatch), when the shapes are incompatible (lhs_cols != pivot_rows, a shape mismatch), when the context rejects the entry (a
nested session on this thread, with the original entry error kept as the
source), or when the backend full-pivot LU solve fails (a backend
failure).
Sourcefn solve_right_full_piv_lu_on_session(
session: &mut dyn Engine,
lhs_values: &[Self],
lhs_rows: usize,
lhs_cols: usize,
pivot_values: &[Self],
pivot_rows: usize,
pivot_cols: usize,
) -> Result<Vec<Self>, BackendLinalgError>
fn solve_right_full_piv_lu_on_session( session: &mut dyn Engine, lhs_values: &[Self], lhs_rows: usize, lhs_cols: usize, pivot_values: &[Self], pivot_rows: usize, pivot_cols: usize, ) -> Result<Vec<Self>, BackendLinalgError>
Same solve, on an engine the caller already holds.
Neither this method nor the backend enters a context, and nothing
consults the process-global one. The shapes and values are interpreted
exactly as in Self::solve_right_full_piv_lu, and they are validated
before the engine is used.
§Errors
Returns a BackendLinalgError when the pivot matrix is not square
(a shape mismatch), when the shapes are incompatible (lhs_cols != pivot_rows, a shape mismatch), or when the backend full-pivot LU solve
fails on the supplied engine (a backend failure).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".