Trait ndarray::Dimension
[−]
[src]
pub unsafe trait Dimension: Clone + Eq + Debug + Send + Sync + Default { type SliceArg: ?Sized + AsRef<[Si]>; }
Array shape and index trait.
unsafe
because of the assumptions in the default methods.
Don't implement or call methods in this trait, its interface is internal to the crate and will evolve at will.
Associated Types
type SliceArg: ?Sized + AsRef<[Si]>
SliceArg
is the type which is used to specify slicing for this
dimension.
For the fixed size dimensions (tuples) it is a fixed size array
of the correct size, which you pass by reference. For the Vec
dimension it is a slice.
- For
Ix
:[Si; 1]
- For
(Ix, Ix)
:[Si; 2]
- and so on..
- For
Vec<Ix>
:[Si]
The easiest way to create a &SliceArg
is using the macro
s![]
.
Implementors
impl Dimension for ()
impl Dimension for Ix
impl Dimension for (Ix, Ix)
impl Dimension for (Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for (Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix, Ix)
impl Dimension for Vec<Ix>