Struct spaces::dimensions::Binary
[−]
[src]
pub struct Binary;
A binary dimension.
Methods
impl Binary[src]
Trait Implementations
impl Debug for Binary[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for Binary[src]
fn eq(&self, __arg_0: &Binary) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src]
This method tests for !=.
impl Eq for Binary[src]
impl Clone for Binary[src]
fn clone(&self) -> Binary[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 Copy for Binary[src]
impl Space for Binary[src]
type Value = bool
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) -> bool[src]
Generate a random sample from the space.
impl BoundedSpace for Binary[src]
type BoundValue = bool
The upper/lower bound type; not necessarily equal to Space::Value.
fn lb(&self) -> &bool[src]
Returns a reference to the dimension's lower value bound (inclusive).
fn ub(&self) -> &bool[src]
Returns a reference to the dimension's upper value bound (exclusive).
fn contains(&self, _: Self::Value) -> bool[src]
Returns true iff val is within the dimension's bounds.