pub struct ResolutionMatrix { /* private fields */ }Expand description
Row-stochastic CSR representation of the resolution operator R
on a fixed target energy grid.
Built from a ResolutionPlan via
ResolutionPlan::compile_to_matrix. Exposed so downstream
surrogates (see epic #472) can access the row-local entries
R_{i, j} directly for LP / quadrature construction.
Owns a copy of the target energy grid for the same reason
ResolutionPlan does: caller-side grid-identity checks and
explicit grid-mismatch errors via
ResolutionError::MatrixGridMismatch.
Implementations§
Source§impl ResolutionMatrix
impl ResolutionMatrix
Sourcepub fn nnz(&self) -> usize
pub fn nnz(&self) -> usize
Total number of stored entries (structural nnz).
Regular-bracket entries with frac == +0.0 retain a
zero-valued contribution at the lo + 1 column to preserve
NaN-safety under re-application to spectra with NaN at that
column; those stored zeros are counted in this total.
Sourcepub fn target_energies(&self) -> &[f64]
pub fn target_energies(&self) -> &[f64]
Target energy grid the matrix was compiled for.
Sourcepub fn row_starts(&self) -> &[u32]
pub fn row_starts(&self) -> &[u32]
CSR row-start offsets. row_starts()[i]..row_starts()[i+1]
names the entry range for row i. Length len() + 1.
Sourcepub fn col_indices(&self) -> &[u32]
pub fn col_indices(&self) -> &[u32]
CSR column indices. Sorted ascending within each row.
Trait Implementations§
Source§impl Clone for ResolutionMatrix
impl Clone for ResolutionMatrix
Source§fn clone(&self) -> ResolutionMatrix
fn clone(&self) -> ResolutionMatrix
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResolutionMatrix
impl RefUnwindSafe for ResolutionMatrix
impl Send for ResolutionMatrix
impl Sync for ResolutionMatrix
impl Unpin for ResolutionMatrix
impl UnsafeUnpin for ResolutionMatrix
impl UnwindSafe for ResolutionMatrix
Blanket Implementations§
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> 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> 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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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