Trait spaces::dimensions::Dimension [] [src]

pub trait Dimension {
    type Value: Debug + Clone;
    fn sample(&self, rng: &mut ThreadRng) -> Self::Value;
fn convert(&self, val: f64) -> Self::Value;
fn span(&self) -> Span; }

The basic dimension type.

Associated Types

The corresponding primitive type.

Required Methods

Sample a random value contained by this dimension.

Map a compatible input into a valid value of this dimension.

Returns the total span of this dimension.

Implementations on Foreign Types

impl<D: Dimension> Dimension for Box<D>
[src]

[src]

[src]

[src]

impl<'a, D: Dimension> Dimension for &'a D
[src]

[src]

[src]

[src]

Implementors