Trait spaces::BoundedSpace
source · pub trait BoundedSpace: Spacewhere
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;
}
Expand description
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.
Required Associated Types§
sourcetype BoundValue: PartialOrd + Copy
type BoundValue: PartialOrd + Copy
The upper/lower bound type; not necessarily equal to Space::Value
.
Required Methods§
sourcefn inf(&self) -> Option<Self::BoundValue>
fn inf(&self) -> Option<Self::BoundValue>
Returns the value of the dimension’s infimum, if it exists.
sourcefn sup(&self) -> Option<Self::BoundValue>
fn sup(&self) -> Option<Self::BoundValue>
Returns the value of the dimension’s supremum, if it exists.
sourcefn contains(&self, val: Self::BoundValue) -> bool
fn contains(&self, val: Self::BoundValue) -> bool
Returns true iff val
lies within the dimension’s bounds (closed).