pub struct ChoiceSource {
pub choices: Arc<[(GroundAtom, f64)]>,
pub choice_index: usize,
pub source_id: Option<usize>,
}Expand description
Metadata for a single Bernoulli decision stage in an annotated disjunction.
Fields§
§choices: Arc<[(GroundAtom, f64)]>Explicit heads of the annotated disjunction, paired with their declared
(marginal) probabilities. Does not include the synthetic implicit “none”
branch. Shared (Arc) across every Bernoulli chain variable of the same
disjunction so that a k-head disjunction pays for one k-length vector,
not O(k) independent clones of it.
choice_index: usizePosition of this ChoiceVarId in the m-1 Bernoulli decision chain.
source_id: Option<usize>Enclosing annotated-disjunction identity. None in v1.
Trait Implementations§
Source§impl Clone for ChoiceSource
impl Clone for ChoiceSource
Source§fn clone(&self) -> ChoiceSource
fn clone(&self) -> ChoiceSource
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 ChoiceSource
impl Debug for ChoiceSource
Source§impl PartialEq for ChoiceSource
impl PartialEq for ChoiceSource
Source§fn eq(&self, other: &ChoiceSource) -> bool
fn eq(&self, other: &ChoiceSource) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ChoiceSource
Auto Trait Implementations§
impl Freeze for ChoiceSource
impl RefUnwindSafe for ChoiceSource
impl Send for ChoiceSource
impl Sync for ChoiceSource
impl Unpin for ChoiceSource
impl UnsafeUnpin for ChoiceSource
impl UnwindSafe for ChoiceSource
Blanket Implementations§
impl<T> Allocation for T
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