[][src]Trait spaces::BoundedSpace

pub trait BoundedSpace: Space where
    Self::Value: PartialOrd
{ type BoundValue: PartialOrd + Copy; fn inf(&self) -> Option<Self::BoundValue>;
fn sup(&self) -> Option<Self::BoundValue>;
fn contains(&self, val: Self::BoundValue) -> bool; }

Trait for defining spaces bounded to lie on an interval I.

Note: If both inf and sup are well defined (i.e. are not None), then the interval is bounded and you have defined a compact space; this is true in spaces as the Interval type is closed.

Associated Types

type BoundValue: PartialOrd + Copy

The upper/lower bound type; not necessarily equal to Space::Value.

Loading content...

Required methods

fn inf(&self) -> Option<Self::BoundValue>

Returns the value of the dimension's infimum, if it exists.

fn sup(&self) -> Option<Self::BoundValue>

Returns the value of the dimension's supremum, if it exists.

fn contains(&self, val: Self::BoundValue) -> bool

Returns true iff val lies within the dimension's bounds (closed).

Loading content...

Implementors

impl BoundedSpace for NonNegativeReals[src]

type BoundValue = Self::Value

impl BoundedSpace for PositiveReals[src]

type BoundValue = Self::Value

impl BoundedSpace for Binary[src]

type BoundValue = bool

impl BoundedSpace for Integers[src]

type BoundValue = Self::Value

impl BoundedSpace for Naturals[src]

type BoundValue = Self::Value

impl BoundedSpace for NonNegativeIntegers[src]

type BoundValue = Self::Value

impl BoundedSpace for NonZeroIntegers[src]

type BoundValue = Self::Value

impl BoundedSpace for Ordinal[src]

type BoundValue = usize

impl BoundedSpace for Partition[src]

type BoundValue = f64

impl BoundedSpace for Interval<f64>[src]

type BoundValue = Self::Value

impl BoundedSpace for Interval<i64>[src]

type BoundValue = Self::Value

Loading content...