Trait spaces::Space
[−]
[src]
pub trait Space {
type Value: Debug + Clone;
fn dim(&self) -> usize;
fn span(&self) -> Span;
fn sample(&self, rng: &mut ThreadRng) -> Self::Value;
}Trait for defining geometric spaces.
Associated Types
Required Methods
fn dim(&self) -> usize
Return the number of dimensions in the space.
fn span(&self) -> Span
Return the number of linear combinations of values in the space.
fn sample(&self, rng: &mut ThreadRng) -> Self::Value
Generate a random sample from the space.
Implementations on Foreign Types
impl<D: Space> Space for Box<D>[src]
impl<'a, D: Space> Space for &'a D[src]
Implementors
impl Space for Null type Value = ();impl Space for Infinite type Value = f64;impl Space for Continuous type Value = f64;impl Space for Partitioned type Value = usize;impl Space for Discrete type Value = usize;impl Space for Binary type Value = bool;impl Space for EmptySpace type Value = ();impl<D1: Space, D2: Space> Space for PairSpace<D1, D2> type Value = (D1::Value, D2::Value);impl<D: Space> Space for RegularSpace<D> type Value = Vec<D::Value>;impl<D: Space> Space for NamedSpace<D> type Value = HashMap<String, D::Value>;