Trait CsrStorage
pub trait CsrStorage<S = f64> {
// Required methods
fn rows(&self) -> usize;
fn columns(&self) -> usize;
fn row_offsets(&self) -> &[usize];
fn column_indices(&self) -> &[usize];
fn values(&self) -> &[S];
}Description
Immutable matrix storage, independent of a linear system’s right-hand side.
Implementors expose CSR arrays only, never an overridable mathematical action
or identity. The inherent actions on dyn CsrStorage use Eqiora’s arithmetic;
canonical capture copies and validates these arrays before assigning identity.
Required Methods§
Implementations§
§impl<S> dyn CsrStorage<S> + '_where
S: Scalar + ComplexFloat + Sync,
impl<S> dyn CsrStorage<S> + '_where
S: Scalar + ComplexFloat + Sync,
pub fn apply_rows(
&self,
rows: Range<usize>,
input: &[S],
output: &mut [S],
) -> Result<(), Diagnostic>
pub fn apply_rows( &self, rows: Range<usize>, input: &[S], output: &mut [S], ) -> Result<(), Diagnostic>
Apply a contiguous range of rows to a complete finite input vector.
No storage is copied or allocated. Each row folds entries in stored order. All input coordinates must be finite, including structurally unused ones. The caller owns disjoint input and output buffers. Output after an arithmetic/storage failure is unspecified; invalid input is rejected before writing output. This action does not certify canonical storage.
§Errors
Returns EQ0802 for invalid dimensions/ranges, nonfinite input or results,
inconsistent CSR array lengths, or invalid offsets/columns in visited rows.
pub fn apply_oriented(
&self,
orientation: LinearOperatorOrientation,
input: &[S],
output: &mut [S],
) -> Result<(), Diagnostic>
pub fn apply_oriented( &self, orientation: LinearOperatorOrientation, input: &[S], output: &mut [S], ) -> Result<(), Diagnostic>
Apply the normal, transpose, or conjugate-transpose matrix action.
Transpose and adjoint visit source rows and their entries in stored order.
This shares the finite-input and output-on-failure contract of
apply_rows, without allocating or copying matrix storage.
§Errors
Returns EQ0802 for invalid dimensions, nonfinite input or results,
inconsistent CSR array lengths, or invalid offsets/columns.