Struct ndarray::Dim [−][src]
pub struct Dim<I: ?Sized> { /* fields omitted */ }
Dimension description.
Dim
describes the number of axes and the length of each axis
in an array. It is also used as an index type.
See also the Dimension
trait for its methods and
operations.
Examples
To create an array with a particular dimension, you'd just pass
a tuple (in this example (3, 2) is used), which is converted to
Dim
by the array constructor.
use ndarray::Array2; use ndarray::Dim; let mut array = Array2::zeros((3, 2)); array[[0, 0]] = 1.; assert_eq!(array.raw_dim(), Dim([3, 2]));
Trait Implementations
impl<I> Serialize for Dim<I> where
I: Serialize,
[src]
impl<I> Serialize for Dim<I> where
I: Serialize,
Requires crate feature "serde-1"
fn serialize<Se>(&self, serializer: Se) -> Result<Se::Ok, Se::Error> where
Se: Serializer,
[src]
fn serialize<Se>(&self, serializer: Se) -> Result<Se::Ok, Se::Error> where
Se: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<'de, I> Deserialize<'de> for Dim<I> where
I: Deserialize<'de>,
[src]
impl<'de, I> Deserialize<'de> for Dim<I> where
I: Deserialize<'de>,
Requires crate feature "serde-1"
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<I> Encodable for Dim<I> where
I: Encodable,
[src]
impl<I> Encodable for Dim<I> where
I: Encodable,
Requires crate feature "rustc-serialize"
fn encode<E: Encoder>(&self, s: &mut E) -> Result<(), E::Error>
[src]
fn encode<E: Encoder>(&self, s: &mut E) -> Result<(), E::Error>
Serialize a value using an Encoder
.
impl<I> Decodable for Dim<I> where
I: Decodable,
[src]
impl<I> Decodable for Dim<I> where
I: Decodable,
Requires crate feature "rustc-serialize"
impl Index<usize> for Dim<[Ix; 0]>
[src]
impl Index<usize> for Dim<[Ix; 0]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 0]>
[src]
impl IndexMut<usize> for Dim<[Ix; 0]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 0]>
[src]
impl Zero for Dim<[Ix; 0]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 1]>
[src]
impl Index<usize> for Dim<[Ix; 1]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 1]>
[src]
impl IndexMut<usize> for Dim<[Ix; 1]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 1]>
[src]
impl Zero for Dim<[Ix; 1]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 2]>
[src]
impl Index<usize> for Dim<[Ix; 2]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 2]>
[src]
impl IndexMut<usize> for Dim<[Ix; 2]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 2]>
[src]
impl Zero for Dim<[Ix; 2]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 3]>
[src]
impl Index<usize> for Dim<[Ix; 3]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 3]>
[src]
impl IndexMut<usize> for Dim<[Ix; 3]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 3]>
[src]
impl Zero for Dim<[Ix; 3]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 4]>
[src]
impl Index<usize> for Dim<[Ix; 4]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 4]>
[src]
impl IndexMut<usize> for Dim<[Ix; 4]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 4]>
[src]
impl Zero for Dim<[Ix; 4]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 5]>
[src]
impl Index<usize> for Dim<[Ix; 5]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 5]>
[src]
impl IndexMut<usize> for Dim<[Ix; 5]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 5]>
[src]
impl Zero for Dim<[Ix; 5]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Index<usize> for Dim<[Ix; 6]>
[src]
impl Index<usize> for Dim<[Ix; 6]>
type Output = usize
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<[Ix; 6]>
[src]
impl IndexMut<usize> for Dim<[Ix; 6]>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl Zero for Dim<[Ix; 6]>
[src]
impl Zero for Dim<[Ix; 6]>
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl<I: Copy + ?Sized> Copy for Dim<I>
[src]
impl<I: Copy + ?Sized> Copy for Dim<I>
impl<I: Clone + ?Sized> Clone for Dim<I>
[src]
impl<I: Clone + ?Sized> Clone for Dim<I>
fn clone(&self) -> Dim<I>
[src]
fn clone(&self) -> Dim<I>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<I: PartialEq + ?Sized> PartialEq for Dim<I>
[src]
impl<I: PartialEq + ?Sized> PartialEq for Dim<I>
fn eq(&self, other: &Dim<I>) -> bool
[src]
fn eq(&self, other: &Dim<I>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Dim<I>) -> bool
[src]
fn ne(&self, other: &Dim<I>) -> bool
This method tests for !=
.
impl<I: Eq + ?Sized> Eq for Dim<I>
[src]
impl<I: Eq + ?Sized> Eq for Dim<I>
impl<I: Default + ?Sized> Default for Dim<I>
[src]
impl<I: Default + ?Sized> Default for Dim<I>
impl<I: ?Sized> PartialEq<I> for Dim<I> where
I: PartialEq,
[src]
impl<I: ?Sized> PartialEq<I> for Dim<I> where
I: PartialEq,
fn eq(&self, rhs: &I) -> bool
[src]
fn eq(&self, rhs: &I) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<I: ?Sized> Hash for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I: ?Sized> Hash for Dim<I> where
Dim<I>: Dimension,
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<I> Debug for Dim<I> where
I: Debug,
[src]
impl<I> Debug for Dim<I> where
I: Debug,
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I> Add for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> Add for Dim<I> where
Dim<I>: Dimension,
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self
[src]
fn add(self, rhs: Self) -> Self
Performs the +
operation.
impl<I> AddAssign for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> AddAssign for Dim<I> where
Dim<I>: Dimension,
fn add_assign(&mut self, rhs: Self)
[src]
fn add_assign(&mut self, rhs: Self)
Performs the +=
operation.
impl<'a, I> AddAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<'a, I> AddAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
fn add_assign(&mut self, rhs: &Self)
[src]
fn add_assign(&mut self, rhs: &Self)
Performs the +=
operation.
impl Add<Ix> for Dim<[Ix; 1]>
[src]
impl Add<Ix> for Dim<[Ix; 1]>
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Ix) -> Self
[src]
fn add(self, rhs: Ix) -> Self
Performs the +
operation.
impl AddAssign<Ix> for Dim<[Ix; 1]>
[src]
impl AddAssign<Ix> for Dim<[Ix; 1]>
fn add_assign(&mut self, rhs: Ix)
[src]
fn add_assign(&mut self, rhs: Ix)
Performs the +=
operation.
impl<I> Sub for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> Sub for Dim<I> where
Dim<I>: Dimension,
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self
[src]
fn sub(self, rhs: Self) -> Self
Performs the -
operation.
impl<I> SubAssign for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> SubAssign for Dim<I> where
Dim<I>: Dimension,
fn sub_assign(&mut self, rhs: Self)
[src]
fn sub_assign(&mut self, rhs: Self)
Performs the -=
operation.
impl<'a, I> SubAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<'a, I> SubAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
fn sub_assign(&mut self, rhs: &Self)
[src]
fn sub_assign(&mut self, rhs: &Self)
Performs the -=
operation.
impl Sub<Ix> for Dim<[Ix; 1]>
[src]
impl Sub<Ix> for Dim<[Ix; 1]>
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Ix) -> Self
[src]
fn sub(self, rhs: Ix) -> Self
Performs the -
operation.
impl SubAssign<Ix> for Dim<[Ix; 1]>
[src]
impl SubAssign<Ix> for Dim<[Ix; 1]>
fn sub_assign(&mut self, rhs: Ix)
[src]
fn sub_assign(&mut self, rhs: Ix)
Performs the -=
operation.
impl<I> Mul for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> Mul for Dim<I> where
Dim<I>: Dimension,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self
[src]
fn mul(self, rhs: Self) -> Self
Performs the *
operation.
impl<I> MulAssign for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> MulAssign for Dim<I> where
Dim<I>: Dimension,
fn mul_assign(&mut self, rhs: Self)
[src]
fn mul_assign(&mut self, rhs: Self)
Performs the *=
operation.
impl<'a, I> MulAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<'a, I> MulAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
fn mul_assign(&mut self, rhs: &Self)
[src]
fn mul_assign(&mut self, rhs: &Self)
Performs the *=
operation.
impl<I> Mul<Ix> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> Mul<Ix> for Dim<I> where
Dim<I>: Dimension,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Ix) -> Self
[src]
fn mul(self, rhs: Ix) -> Self
Performs the *
operation.
impl<I> MulAssign<Ix> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> MulAssign<Ix> for Dim<I> where
Dim<I>: Dimension,
fn mul_assign(&mut self, rhs: Ix)
[src]
fn mul_assign(&mut self, rhs: Ix)
Performs the *=
operation.
impl Dimension for Dim<[Ix; 0]>
[src]
impl Dimension for Dim<[Ix; 0]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(0)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 0]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = ()
Pattern matching friendly form of the dimension value. Read more
type Smaller = Self
Next smaller dimension (if applicable)
type Larger = Ix1
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn _fastest_varying_stride_order(&self) -> Self
[src]
fn _fastest_varying_stride_order(&self) -> Self
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn next_for(&self, _index: Self) -> Option<Self>
[src]
fn next_for(&self, _index: Self) -> Option<Self>
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, _ignore: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, _ignore: Axis) -> Self::Smaller
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 1]>
[src]
impl Dimension for Dim<[Ix; 1]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(1)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 1]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = Ix
Pattern matching friendly form of the dimension value. Read more
type Smaller = Ix0
Next smaller dimension (if applicable)
type Larger = Ix2
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn next_for(&self, index: Self) -> Option<Self>
[src]
fn next_for(&self, index: Self) -> Option<Self>
fn equal(&self, rhs: &Self) -> bool
[src]
fn equal(&self, rhs: &Self) -> bool
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn default_strides(&self) -> Self
[src]
fn default_strides(&self) -> Self
fn _fastest_varying_stride_order(&self) -> Self
[src]
fn _fastest_varying_stride_order(&self) -> Self
fn min_stride_axis(&self, _: &Self) -> Axis
[src]
fn min_stride_axis(&self, _: &Self) -> Axis
fn max_stride_axis(&self, _: &Self) -> Axis
[src]
fn max_stride_axis(&self, _: &Self) -> Axis
fn first_index(&self) -> Option<Self>
[src]
fn first_index(&self) -> Option<Self>
fn stride_offset(index: &Self, stride: &Self) -> isize
[src]
fn stride_offset(index: &Self, stride: &Self) -> isize
fn stride_offset_checked(&self, stride: &Self, index: &Self) -> Option<isize>
[src]
fn stride_offset_checked(&self, stride: &Self, index: &Self) -> Option<isize>
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 2]>
[src]
impl Dimension for Dim<[Ix; 2]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(2)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 2]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = (Ix, Ix)
Pattern matching friendly form of the dimension value. Read more
type Smaller = Ix1
Next smaller dimension (if applicable)
type Larger = Ix3
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn next_for(&self, index: Self) -> Option<Self>
[src]
fn next_for(&self, index: Self) -> Option<Self>
fn equal(&self, rhs: &Self) -> bool
[src]
fn equal(&self, rhs: &Self) -> bool
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn last_elem(&self) -> usize
[src]
fn last_elem(&self) -> usize
fn set_last_elem(&mut self, i: usize)
[src]
fn set_last_elem(&mut self, i: usize)
fn default_strides(&self) -> Self
[src]
fn default_strides(&self) -> Self
fn fortran_strides(&self) -> Self
[src]
fn fortran_strides(&self) -> Self
fn _fastest_varying_stride_order(&self) -> Self
[src]
fn _fastest_varying_stride_order(&self) -> Self
fn min_stride_axis(&self, strides: &Self) -> Axis
[src]
fn min_stride_axis(&self, strides: &Self) -> Axis
fn first_index(&self) -> Option<Self>
[src]
fn first_index(&self) -> Option<Self>
fn stride_offset(index: &Self, strides: &Self) -> isize
[src]
fn stride_offset(index: &Self, strides: &Self) -> isize
fn stride_offset_checked(&self, strides: &Self, index: &Self) -> Option<isize>
[src]
fn stride_offset_checked(&self, strides: &Self, index: &Self) -> Option<isize>
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 3]>
[src]
impl Dimension for Dim<[Ix; 3]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(3)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 3]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = (Ix, Ix, Ix)
Pattern matching friendly form of the dimension value. Read more
type Smaller = Ix2
Next smaller dimension (if applicable)
type Larger = Ix4
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn next_for(&self, index: Self) -> Option<Self>
[src]
fn next_for(&self, index: Self) -> Option<Self>
fn stride_offset(index: &Self, strides: &Self) -> isize
[src]
fn stride_offset(index: &Self, strides: &Self) -> isize
fn stride_offset_checked(&self, strides: &Self, index: &Self) -> Option<isize>
[src]
fn stride_offset_checked(&self, strides: &Self, index: &Self) -> Option<isize>
fn _fastest_varying_stride_order(&self) -> Self
[src]
fn _fastest_varying_stride_order(&self) -> Self
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 4]>
[src]
impl Dimension for Dim<[Ix; 4]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(4)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 4]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = (Ix, Ix, Ix, Ix)
Pattern matching friendly form of the dimension value. Read more
type Smaller = Dim<[Ix; 3]>
Next smaller dimension (if applicable)
type Larger = Ix5
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 5]>
[src]
impl Dimension for Dim<[Ix; 5]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(5)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 5]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = (Ix, Ix, Ix, Ix, Ix)
Pattern matching friendly form of the dimension value. Read more
type Smaller = Dim<[Ix; 4]>
Next smaller dimension (if applicable)
type Larger = Ix6
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[Ix; 6]>
[src]
impl Dimension for Dim<[Ix; 6]>
const NDIM: Option<usize>
NDIM: Option<usize> = Some(6)
For fixed-size dimension representations (e.g. Ix2
), this should be Some(ndim)
, and for variable-size dimension representations (e.g. IxDyn
), this should be None
. Read more
type SliceArg = [SliceOrIndex; 6]
SliceArg
is the type which is used to specify slicing for this dimension. Read more
type Pattern = (Ix, Ix, Ix, Ix, Ix, Ix)
Pattern matching friendly form of the dimension value. Read more
type Smaller = Dim<[Ix; 5]>
Next smaller dimension (if applicable)
type Larger = IxDyn
Next larger dimension
fn ndim(&self) -> usize
[src]
fn ndim(&self) -> usize
fn into_pattern(self) -> Self::Pattern
[src]
fn into_pattern(self) -> Self::Pattern
Convert the dimension into a pattern matching friendly value.
fn slice(&self) -> &[Ix]
[src]
fn slice(&self) -> &[Ix]
fn slice_mut(&mut self) -> &mut [Ix]
[src]
fn slice_mut(&mut self) -> &mut [Ix]
fn zero_index_with_ndim(ndim: usize) -> Self
[src]
fn zero_index_with_ndim(ndim: usize) -> Self
fn insert_axis(&self, axis: Axis) -> Self::Larger
[src]
fn insert_axis(&self, axis: Axis) -> Self::Larger
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn try_remove_axis(&self, axis: Axis) -> Self::Smaller
fn size(&self) -> usize
[src]
fn size(&self) -> usize
Compute the size of the dimension (number of elements)
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayView1<Ix>
[src]
fn as_array_view(&self) -> ArrayView1<Ix>
Borrow as a read-only array view.
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
[src]
fn as_array_view_mut(&mut self) -> ArrayViewMut1<Ix>
Borrow as a read-write array view.
fn into_dyn(self) -> IxDyn
[src]
fn into_dyn(self) -> IxDyn
Convert the dimensional into a dynamic dimensional (IxDyn).
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Index<usize> for Dim<IxDynImpl>
[src]
impl Index<usize> for Dim<IxDynImpl>
type Output = <IxDynImpl as Index<usize>>::Output
The returned type after indexing.
fn index(&self, index: usize) -> &Self::Output
[src]
fn index(&self, index: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl IndexMut<usize> for Dim<IxDynImpl>
[src]
impl IndexMut<usize> for Dim<IxDynImpl>
fn index_mut(&mut self, index: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, index: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl RemoveAxis for Dim<IxDynImpl>
[src]
impl RemoveAxis for Dim<IxDynImpl>
fn remove_axis(&self, axis: Axis) -> Self
[src]
fn remove_axis(&self, axis: Axis) -> Self
impl NdIndex<IxDyn> for Dim<[Ix; 0]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 0]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 1]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 1]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 2]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 2]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 3]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 3]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 4]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 4]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 5]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 5]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl NdIndex<IxDyn> for Dim<[Ix; 6]>
[src]
impl NdIndex<IxDyn> for Dim<[Ix; 6]>
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
[src]
fn index_checked(&self, dim: &IxDyn, strides: &IxDyn) -> Option<isize>
fn index_unchecked(&self, strides: &IxDyn) -> isize
[src]
fn index_unchecked(&self, strides: &IxDyn) -> isize
impl RemoveAxis for Dim<[Ix; 1]>
[src]
impl RemoveAxis for Dim<[Ix; 1]>
fn remove_axis(&self, _: Axis) -> Ix0
[src]
fn remove_axis(&self, _: Axis) -> Ix0
impl RemoveAxis for Dim<[Ix; 2]>
[src]
impl RemoveAxis for Dim<[Ix; 2]>
fn remove_axis(&self, axis: Axis) -> Ix1
[src]
fn remove_axis(&self, axis: Axis) -> Ix1
impl RemoveAxis for Dim<[Ix; 3]>
[src]
impl RemoveAxis for Dim<[Ix; 3]>
fn remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn remove_axis(&self, axis: Axis) -> Self::Smaller
impl RemoveAxis for Dim<[Ix; 4]>
[src]
impl RemoveAxis for Dim<[Ix; 4]>
fn remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn remove_axis(&self, axis: Axis) -> Self::Smaller
impl RemoveAxis for Dim<[Ix; 5]>
[src]
impl RemoveAxis for Dim<[Ix; 5]>
fn remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn remove_axis(&self, axis: Axis) -> Self::Smaller
impl RemoveAxis for Dim<[Ix; 6]>
[src]
impl RemoveAxis for Dim<[Ix; 6]>
fn remove_axis(&self, axis: Axis) -> Self::Smaller
[src]
fn remove_axis(&self, axis: Axis) -> Self::Smaller