pub struct SampledDecisionVariable { /* private fields */ }Expand description
Multiple sample evaluation results with deduplication
Implementations§
Source§impl SampledDecisionVariable
impl SampledDecisionVariable
Sourcepub fn new(
id: VariableID,
decision_variable: DecisionVariable,
samples: Sampled<f64>,
) -> Result<Self, DecisionVariableError>
pub fn new( id: VariableID, decision_variable: DecisionVariable, samples: Sampled<f64>, ) -> Result<Self, DecisionVariableError>
Create a new sampled decision-variable row from an ID, row definition, and samples.
This method does not enforce kind or bound constraints - those are checked as part of sample-set feasibility validation. The ID is used for error reporting only; the returned row does not store it.
Sourcepub fn get(
&self,
id: VariableID,
sample_id: SampleID,
) -> Option<EvaluatedDecisionVariable>
pub fn get( &self, id: VariableID, sample_id: SampleID, ) -> Option<EvaluatedDecisionVariable>
Get a specific evaluated decision variable by sample ID.
Returns None if sample_id is not present in the sampled data.
Trait Implementations§
Source§impl Clone for SampledDecisionVariable
impl Clone for SampledDecisionVariable
Source§fn clone(&self) -> SampledDecisionVariable
fn clone(&self) -> SampledDecisionVariable
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 SampledDecisionVariable
impl Debug for SampledDecisionVariable
Source§impl From<SampledDecisionVariable> for SampledDecisionVariable
impl From<SampledDecisionVariable> for SampledDecisionVariable
Source§fn from(value: SampledDecisionVariable) -> Self
fn from(value: SampledDecisionVariable) -> Self
Converts to this type from the input type.
Source§impl TryFrom<SampledDecisionVariable> for SampledDecisionVariable
impl TryFrom<SampledDecisionVariable> for SampledDecisionVariable
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for SampledDecisionVariable
impl RefUnwindSafe for SampledDecisionVariable
impl Send for SampledDecisionVariable
impl Sync for SampledDecisionVariable
impl Unpin for SampledDecisionVariable
impl UnsafeUnpin for SampledDecisionVariable
impl UnwindSafe for SampledDecisionVariable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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> ⓘ
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 more