Struct CanonicalCsrSystemView
pub struct CanonicalCsrSystemView<S = f64> { /* private fields */ }Description
Captured complete CSR system with one Eqiora-owned mathematical action.
Construction copies every exposed slice exactly once, validates the copy, and thereafter derives the host action, linear problem, and agreement fingerprint from those owned bytes. A third-party storage implementation cannot substitute an unrelated virtual operator action.
Implementations§
§impl<S> CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
impl<S> CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
pub fn new(
storage: &dyn CsrStorage<S>,
right_hand_side: &[S],
properties: LinearOperatorProperties,
) -> Result<CanonicalCsrSystemView<S>, Diagnostic>
pub fn new( storage: &dyn CsrStorage<S>, right_hand_side: &[S], properties: LinearOperatorProperties, ) -> Result<CanonicalCsrSystemView<S>, Diagnostic>
Capture and validate one complete square finite binary64 real or complex CSR system.
§Errors
Returns EQ0807 for an empty or non-square system, malformed CSR,
non-finite values, an RHS mismatch, or a count outside portable u64.
pub fn row_offsets(&self) -> &[usize]
pub fn row_offsets(&self) -> &[usize]
CSR row offsets captured at construction.
pub fn column_indices(&self) -> &[usize]
pub fn column_indices(&self) -> &[usize]
CSR column indices captured at construction.
pub fn right_hand_side(&self) -> &[S]
pub fn right_hand_side(&self) -> &[S]
Complete RHS captured at construction.
pub const fn properties(&self) -> LinearOperatorProperties
pub const fn properties(&self) -> LinearOperatorProperties
Realization-asserted mathematical properties.
pub const fn agreement_fingerprint(&self) -> CanonicalCsrAgreementFingerprintV1
pub const fn agreement_fingerprint(&self) -> CanonicalCsrAgreementFingerprintV1
Exact L2 algebraic agreement identity.
pub fn linear_problem(&self) -> Result<LinearProblem<'_, S>, Diagnostic>
pub fn linear_problem(&self) -> Result<LinearProblem<'_, S>, Diagnostic>
Borrow this same captured system as a host linear problem.
§Errors
Returns EQ0802 only if the internal fixed action contradicts the
invariants already checked at construction.
pub fn linear_problem_with_right_hand_side<'a>(
&'a self,
right_hand_side: &'a [S],
) -> Result<LinearProblem<'a, S>, Diagnostic>
pub fn linear_problem_with_right_hand_side<'a>( &'a self, right_hand_side: &'a [S], ) -> Result<LinearProblem<'a, S>, Diagnostic>
Borrow this captured coefficient system with a caller-supplied right-hand side.
This preserves the exact canonical CSR coefficient source for direct backends while allowing correction, sensitivity, and adjoint solves to bind a right-hand side distinct from the captured primal one.
§Errors
Returns EQ0802 when right_hand_side has the wrong length or contains
a non-finite value.
Trait Implementations§
§impl<S> Clone for CanonicalCsrSystemView<S>where
S: Clone,
impl<S> Clone for CanonicalCsrSystemView<S>where
S: Clone,
§impl<S> CsrStorage<S> for CanonicalCsrSystemView<S>
impl<S> CsrStorage<S> for CanonicalCsrSystemView<S>
§impl<S> Debug for CanonicalCsrSystemView<S>where
S: Debug,
impl<S> Debug for CanonicalCsrSystemView<S>where
S: Debug,
§impl<S> LinearOperator for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
impl<S> LinearOperator for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
§fn apply(&self, input: &[S], output: &mut [S]) -> Result<(), Diagnostic>
fn apply(&self, input: &[S], output: &mut [S]) -> Result<(), Diagnostic>
output = self * input. Read more§fn row_action(&self) -> Option<&dyn RowLinearAction<Scalar = S>>
fn row_action(&self) -> Option<&dyn RowLinearAction<Scalar = S>>
§fn diagonal(&self, output: &mut [S]) -> Result<DiagonalAvailability, Diagnostic>
fn diagonal(&self, output: &mut [S]) -> Result<DiagonalAvailability, Diagnostic>
§fn orientation(&self) -> LinearOperatorOrientation
fn orientation(&self) -> LinearOperatorOrientation
§impl<S> OrientedLinearOperator for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
impl<S> OrientedLinearOperator for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
§fn supports_orientation(&self, _orientation: LinearOperatorOrientation) -> bool
fn supports_orientation(&self, _orientation: LinearOperatorOrientation) -> bool
§fn apply_oriented(
&self,
orientation: LinearOperatorOrientation,
input: &[S],
output: &mut [S],
) -> Result<(), Diagnostic>
fn apply_oriented( &self, orientation: LinearOperatorOrientation, input: &[S], output: &mut [S], ) -> Result<(), Diagnostic>
§impl<S> PartialEq for CanonicalCsrSystemView<S>where
S: PartialEq,
impl<S> PartialEq for CanonicalCsrSystemView<S>where
S: PartialEq,
§fn eq(&self, other: &CanonicalCsrSystemView<S>) -> bool
fn eq(&self, other: &CanonicalCsrSystemView<S>) -> bool
self and other values to be equal, and is used by ==.§impl<S> RowLinearAction for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
impl<S> RowLinearAction for CanonicalCsrSystemView<S>where
S: Scalar + ComplexFloat<Real = f64> + Sync,
§fn apply_rows(
&self,
rows: Range<usize>,
input: &[S],
output: &mut [S],
) -> Result<(), Diagnostic>
fn apply_rows( &self, rows: Range<usize>, input: &[S], output: &mut [S], ) -> Result<(), Diagnostic>
impl<S> StructuralPartialEq for CanonicalCsrSystemView<S>
Auto Trait Implementations§
impl<S> Freeze for CanonicalCsrSystemView<S>
impl<S> RefUnwindSafe for CanonicalCsrSystemView<S>where
S: RefUnwindSafe,
impl<S> Send for CanonicalCsrSystemView<S>where
S: Send,
impl<S> Sync for CanonicalCsrSystemView<S>where
S: Sync,
impl<S> Unpin for CanonicalCsrSystemView<S>where
S: Unpin,
impl<S> UnsafeUnpin for CanonicalCsrSystemView<S>
impl<S> UnwindSafe for CanonicalCsrSystemView<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.