Enum spaces::Span
[−]
[src]
pub enum Span {
Null,
Finite(usize),
Infinite,
}Measure of the span of a vector space.
Span is typically used to compute the number of possible values that can be reached within
some vector space. For example, for a space with 2 dimensions, each with a finite set of
values, we have:
use spaces::{PairSpace, Space, Span}; use spaces::dimensions::Discrete; let d1 = Discrete::new(5); let d2 = Discrete::new(10); let space = PairSpace::new(d1, d2); assert_eq!(space.span(), Span::Finite(50));
Internally, this above code does the following:
use spaces::Span; let s1 = Span::Finite(5); let s2 = Span::Finite(10); assert_eq!(s1*s2, Span::Finite(50));
Variants
NullFinite(usize)Infinite
Trait Implementations
impl Clone for Span[src]
fn clone(&self) -> Span[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 Span[src]
impl Debug for Span[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl PartialEq for Span[src]
fn eq(&self, __arg_0: &Span) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Span) -> bool[src]
This method tests for !=.
impl Eq for Span[src]
impl Mul for Span[src]
type Output = Span
The resulting type after applying the * operator.
fn mul(self, rhs: Span) -> Span[src]
Performs the * operation.