Struct spaces::RegularSpace
[−]
[src]
pub struct RegularSpace<D: Dimension> { /* fields omitted */ }
N-dimensional homogeneous space.
Methods
impl<D: Dimension> RegularSpace<D>[src]
pub fn new(dimensions: Vec<D>) -> Self[src]
pub fn empty() -> Self[src]
pub fn push(self, d: D) -> Self[src]
ⓘImportant traits for Iter<'a, T>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 + Dimension> 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 + Dimension> 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: Dimension> Space for RegularSpace<D>[src]
type Repr = Vec<D::Value>
The data representation of the space.
fn dim(&self) -> usize[src]
Return the number of dimensions in the space.
fn span(&self) -> Span[src]
Return the number of linear combinations of values in the space.
fn sample(&self, rng: &mut ThreadRng) -> Self::Repr[src]
Generate a random sample from the space.
impl<D, X> Surjection<Vec<X>, Vec<D::Value>> for RegularSpace<D> where
D: Dimension + Surjection<X, <D as Dimension>::Value>, [src]
D: Dimension + Surjection<X, <D as Dimension>::Value>,
impl<D: Dimension> Index<usize> for RegularSpace<D>[src]
type Output = D
The returned type after indexing.
ⓘImportant traits for &'a mut Wfn index(&self, index: usize) -> &D[src]
Performs the indexing (container[index]) operation.
impl<D: Dimension> 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: Dimension> 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: Dimension> 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: Dimension> 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,