pub struct Chance<'a> { /* private fields */ }
Expand description
A chance node
A chance node represents a point in the game where things advance randomly, or alternatively, where “nature” takes a turn.
Implementations§
Source§impl<'a> Chance<'a>
impl<'a> Chance<'a>
Sourcepub fn name(&self) -> &'a EscapedStr
pub fn name(&self) -> &'a EscapedStr
The name of the node
Sourcepub fn infoset_name(&self) -> Option<&'a EscapedStr>
pub fn infoset_name(&self) -> Option<&'a EscapedStr>
The infoset’s name
Note that just because this infoset doesn’t have a name attached, doesn’t mean that the same id doesn’t have a name attached at a different node.
Sourcepub fn actions(&self) -> &[(&'a EscapedStr, BigRational, Node<'a>)]
pub fn actions(&self) -> &[(&'a EscapedStr, BigRational, Node<'a>)]
All possible outcomes with names and probabilities
Sourcepub fn outcome_payoffs(&self) -> Option<&[BigRational]>
pub fn outcome_payoffs(&self) -> Option<&[BigRational]>
Outcome payoffs for this node
Outcome payoffs are added to every players’ payoffs for traversing through this node. Note that if these are missing, they be defined at another node sharing the same outcome.
Trait Implementations§
impl<'a> StructuralPartialEq for Chance<'a>
Auto Trait Implementations§
impl<'a> Freeze for Chance<'a>
impl<'a> RefUnwindSafe for Chance<'a>
impl<'a> Send for Chance<'a>
impl<'a> Sync for Chance<'a>
impl<'a> Unpin for Chance<'a>
impl<'a> UnwindSafe for Chance<'a>
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