Struct spaces::discrete::Naturals [−][src]
pub struct Naturals;
The set of all natural numbers.
Trait Implementations
impl Debug for Naturals
[src]
impl Debug for Naturals
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Naturals
[src]
impl Clone for Naturals
fn clone(&self) -> Naturals
[src]
fn clone(&self) -> Naturals
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Naturals
[src]
impl Copy for Naturals
impl Space for Naturals
[src]
impl Space for Naturals
type Value = u64
The data representation of the space.
fn dim(&self) -> usize
[src]
fn dim(&self) -> usize
Return the number of dimensions in the space.
fn card(&self) -> Card
[src]
fn card(&self) -> Card
Return the number of elements in the set composing the space.
fn sample<R: Rng + ?Sized>(&self, _: &mut R) -> u64
[src]
fn sample<R: Rng + ?Sized>(&self, _: &mut R) -> u64
Generate a random sample from the space.
impl BoundedSpace for Naturals
[src]
impl BoundedSpace for Naturals
type BoundValue = Self::Value
The upper/lower bound type; not necessarily equal to Space::Value
.
fn inf(&self) -> Option<u64>
[src]
fn inf(&self) -> Option<u64>
Returns the value of the dimension's infimum.
fn sup(&self) -> Option<u64>
[src]
fn sup(&self) -> Option<u64>
Returns the value of the dimension's supremum.
fn contains(&self, _: Self::BoundValue) -> bool
[src]
fn contains(&self, _: Self::BoundValue) -> bool
Returns true iff val
is within the dimension's bounds.