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

Trait Implementations

impl Clone for Span
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Span
[src]

impl Debug for Span
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Span
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Span
[src]

impl Mul for Span
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Into<usize> for Span
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Span

impl Sync for Span