Struct discrete::Context [] [src]

pub struct Context<T = Data>(_);

A discrete space that can model spatial operations over arbitrary states, therefore useful for context analysis.

It can be constructed by taking a N-dimensional space, for each dimension create a pair subspace and sum over the dimensions. It can also be thought of as the edges in an undirected graph, where each node is described by a N-dimensional coordinate, and all nodes are connected which differ by one axis.

Dimensions of size 2 gives the edges on a hypercube of the number of dimensions. For example, [2, 2, 2] gives edges on a cube in 3 dimensions.

Trait Implementations

impl<T> Construct for Context<T>
[src]

Constructs a new Self.

impl Count<Vec<usize>> for Context<Data>
[src]

Counts the size of space given the dimensions.

impl<T, U> Count<Vec<U>> for Context<Of<T>> where
    T: Construct + Count<U>, 
[src]

Counts the size of space given the dimensions.

impl Zero<Vec<usize>, (Vec<usize>, usize, usize)> for Context<Data>
[src]

Creates a default element.

impl<T, U, V> Zero<Vec<U>, (Vec<V>, usize, V)> for Context<Of<T>> where
    T: Construct + Count<U> + ToPos<U, V> + Zero<U, V>, 
[src]

Creates a default element.

impl ToIndex<Vec<usize>, (Vec<usize>, usize, usize)> for Context<Data>
[src]

Converts position to index.

impl<T, U, V> ToIndex<Vec<U>, (Vec<V>, usize, V)> for Context<Of<T>> where
    T: Construct + Count<U> + ToIndex<U, V>, 
[src]

Converts position to index.

impl ToPos<Vec<usize>, (Vec<usize>, usize, usize)> for Context<Data>
[src]

Converts index to position.

impl<T, U, V> ToPos<Vec<U>, (Vec<V>, usize, V)> for Context<Of<T>> where
    T: Construct + Count<U> + ToPos<U, V> + Zero<U, V>, 
[src]

Converts index to position.