pub enum OwnedCellValues {
Dense(Array2<f64>),
ByRow {
values: Array1<f64>,
n_outputs: usize,
},
ByOutput {
n_rows: usize,
values: Array1<f64>,
},
Constant {
n_rows: usize,
n_outputs: usize,
value: f64,
},
ConstantWithOverrides {
n_rows: usize,
n_outputs: usize,
default: f64,
cells: IndexedCellSet,
values: Vec<f64>,
},
}Expand description
Owned values over a declared (row, output) grid.
ConstantWithOverrides is the canonical sparse-event representation: zero
is implicit everywhere and only event cells are stored. Row and output
broadcasts retain separable fields such as quadrature exposure or an
endpoint-specific threshold without allocating the Cartesian grid.
Variants§
Implementations§
Source§impl OwnedCellValues
impl OwnedCellValues
pub fn dense(values: Array2<f64>) -> Self
Sourcepub fn by_row(values: Array1<f64>, n_outputs: usize) -> Self
pub fn by_row(values: Array1<f64>, n_outputs: usize) -> Self
Broadcast one value per row over every output.
Sourcepub fn by_output(n_rows: usize, values: Array1<f64>) -> Self
pub fn by_output(n_rows: usize, values: Array1<f64>) -> Self
Broadcast one value per output over every row.
pub fn constant(n_rows: usize, n_outputs: usize, value: f64) -> Self
pub fn constant_with_overrides( n_rows: usize, n_outputs: usize, default: f64, overrides: Vec<(usize, usize, f64)>, ) -> Result<Self, IndexedResponseError>
pub fn n_rows(&self) -> usize
pub fn n_outputs(&self) -> usize
pub fn value(&self, row: usize, output: usize) -> Option<f64>
Trait Implementations§
Source§impl Clone for OwnedCellValues
impl Clone for OwnedCellValues
Source§fn clone(&self) -> OwnedCellValues
fn clone(&self) -> OwnedCellValues
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OwnedCellValues
impl Debug for OwnedCellValues
Source§impl PartialEq for OwnedCellValues
impl PartialEq for OwnedCellValues
impl StructuralPartialEq for OwnedCellValues
Auto Trait Implementations§
impl Freeze for OwnedCellValues
impl RefUnwindSafe for OwnedCellValues
impl Send for OwnedCellValues
impl Sync for OwnedCellValues
impl Unpin for OwnedCellValues
impl UnsafeUnpin for OwnedCellValues
impl UnwindSafe for OwnedCellValues
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.