Struct spaces::RegularSpace
[−]
[src]
pub struct RegularSpace<D: Space> { /* fields omitted */ }
N-dimensional homogeneous space.
Methods
impl<D: Space> RegularSpace<D>
[src]
pub fn new(dimensions: Vec<D>) -> Self
[src]
pub fn empty() -> Self
[src]
pub fn push(self, d: D) -> Self
[src]
pub fn iter(&self) -> SliceIter<D>
[src]
impl RegularSpace<Continuous>
[src]
pub fn partitioned(self, density: usize) -> RegularSpace<Partitioned>
[src]
impl RegularSpace<Partitioned>
[src]
Trait Implementations
impl<D: Clone + Space> Clone for RegularSpace<D>
[src]
fn clone(&self) -> RegularSpace<D>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<D: Debug + Space> Debug for RegularSpace<D>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<D: Space> Space for RegularSpace<D>
[src]
type Value = Vec<D::Value>
The data representation of the space.
fn dim(&self) -> usize
[src]
Return the number of dimensions in the space.
fn card(&self) -> Card
[src]
Return the number of linear combinations of values in the space.
fn sample(&self, rng: &mut ThreadRng) -> Vec<D::Value>
[src]
Generate a random sample from the space.
impl<D, X> Surjection<Vec<X>, Vec<D::Value>> for RegularSpace<D> where
D: Space + Surjection<X, <D as Space>::Value>,
[src]
D: Space + Surjection<X, <D as Space>::Value>,
impl<D: Space> Index<usize> for RegularSpace<D>
[src]
type Output = D
The returned type after indexing.
fn index(&self, index: usize) -> &D
[src]
Performs the indexing (container[index]
) operation.
impl<D: Space> FromIterator<D> for RegularSpace<D>
[src]
fn from_iter<I: IntoIterator<Item = D>>(iter: I) -> Self
[src]
Creates a value from an iterator. Read more
impl<D: Space> IntoIterator for RegularSpace<D>
[src]
type Item = D
The type of the elements being iterated over.
type IntoIter = IntoIter<D>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
Creates an iterator from a value. Read more
impl<D: Space> Add<D> for RegularSpace<D>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: D) -> Self::Output
[src]
Performs the +
operation.
impl<D: Space> Add<RegularSpace<D>> for RegularSpace<D>
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: RegularSpace<D>) -> Self::Output
[src]
Performs the +
operation.
Auto Trait Implementations
impl<D> Send for RegularSpace<D> where
D: Send,
D: Send,
impl<D> Sync for RegularSpace<D> where
D: Sync,
D: Sync,