pub struct InformationStructure {
pub sets: Vec<InformationSet>,
pub node_to_set: HashMap<NodeId, usize>,
}Expand description
Collection of all information sets in a game.
Fields§
§sets: Vec<InformationSet>Information sets indexed by their ID.
node_to_set: HashMap<NodeId, usize>Map from node ID to information set ID.
Implementations§
Source§impl InformationStructure
impl InformationStructure
Sourcepub fn add_set(
&mut self,
player: usize,
nodes: Vec<NodeId>,
actions: Vec<String>,
) -> usize
pub fn add_set( &mut self, player: usize, nodes: Vec<NodeId>, actions: Vec<String>, ) -> usize
Add an information set.
Sourcepub fn set_for_node(&self, node: NodeId) -> Option<&InformationSet>
pub fn set_for_node(&self, node: NodeId) -> Option<&InformationSet>
Get the information set for a node.
Trait Implementations§
Source§impl Clone for InformationStructure
impl Clone for InformationStructure
Source§fn clone(&self) -> InformationStructure
fn clone(&self) -> InformationStructure
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 InformationStructure
impl Debug for InformationStructure
Source§impl Default for InformationStructure
impl Default for InformationStructure
Source§fn default() -> InformationStructure
fn default() -> InformationStructure
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InformationStructure
impl RefUnwindSafe for InformationStructure
impl Send for InformationStructure
impl Sync for InformationStructure
impl Unpin for InformationStructure
impl UnsafeUnpin for InformationStructure
impl UnwindSafe for InformationStructure
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