Trait renforce::environment::FiniteSpace
[−]
[src]
pub trait FiniteSpace: Space { fn enumerate(&self) -> Vec<Self::Element>; fn size(&self) -> usize { ... } fn index(&self, elm: &Self::Element) -> isize { ... } }
Finite Space Trait
Represents a space with finitely many members
Required Methods
fn enumerate(&self) -> Vec<Self::Element>
(Determistically) Returns a vector of all elements of this space
Provided Methods
fn size(&self) -> usize
Returns the number of elements in this space
fn index(&self, elm: &Self::Element) -> isize
Returns the index of an element in the vector returned by enumerate
Implementors
impl FiniteSpace for Finite
impl FiniteSpace for ()
impl<T: FiniteSpace, U: FiniteSpace> FiniteSpace for (T, U)
impl<T: FiniteSpace + Clone> FiniteSpace for Vec<T>