pub struct Context<T = Data>(/* private fields */);
Expand description
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.
The position is a tuple (Vec<usize>, usize, usize)
,
where the first component describes the node coordinates,
the second component describes the index of the coordinate that changes,
and the third component describes the new value.
The dimension type of the space.
The position type of the space.
Counts the size of space given the dimensions.
Creates a default element.
Converts position to index.
Converts index to position.
The dimension type of the space.
The position type of the space.
Counts the size of space given the dimensions.
Creates a default element.
Converts position to index.
Converts index to position.
The dimension type of the space.
The position type of the space.
Counts the size of space given the dimensions.
Creates a default element.
Converts position to index.
Converts index to position.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Counts the size of space given the dimensions.
Counts the size of space given the dimensions.
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
Converts position to index.
Converts position to index.
Converts index to position.
Converts index to position.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Creates a default element.
Creates a default element.