Struct extendr_api::prelude::Dim
source · [−]pub struct Dim<I> where
I: ?Sized, { /* private fields */ }
Expand description
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]));
Implementations
Trait Implementations
sourceimpl<'a, I> AddAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<'a, I> AddAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn add_assign(&mut self, rhs: &Dim<I>)
pub fn add_assign(&mut self, rhs: &Dim<I>)
Performs the +=
operation. Read more
sourceimpl<I> AddAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<I> AddAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn add_assign(&mut self, rhs: Dim<I>)
pub fn add_assign(&mut self, rhs: Dim<I>)
Performs the +=
operation. Read more
sourceimpl AddAssign<usize> for Dim<[usize; 1]>
impl AddAssign<usize> for Dim<[usize; 1]>
sourcepub fn add_assign(&mut self, rhs: usize)
pub fn add_assign(&mut self, rhs: usize)
Performs the +=
operation. Read more
sourceimpl<D> DimAdd<D> for Dim<[usize; 0]> where
D: Dimension,
impl<D> DimAdd<D> for Dim<[usize; 0]> where
D: Dimension,
type Output = D
type Output = D
The sum of the two dimensions.
sourceimpl Dimension for Dim<[usize; 3]>
impl Dimension for Dim<[usize; 3]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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 Pattern = (usize, usize, usize)
type Pattern = (usize, usize, usize)
Pattern matching friendly form of the dimension value. Read more
sourcepub fn into_pattern(self) -> <Dim<[usize; 3]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 3]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 3]>
pub fn zeros(ndim: usize) -> Dim<[usize; 3]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn next_for(&self, index: Dim<[usize; 3]>) -> Option<Dim<[usize; 3]>>
pub fn stride_offset(
index: &Dim<[usize; 3]>,
strides: &Dim<[usize; 3]>
) -> isize
pub fn stride_offset_checked(
&self,
strides: &Dim<[usize; 3]>,
index: &Dim<[usize; 3]>
) -> Option<isize>
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 3]>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 3]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 3]> as Dimension>::Smaller
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 5]>
impl Dimension for Dim<[usize; 5]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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 Pattern = (usize, usize, usize, usize, usize)
type Pattern = (usize, usize, usize, usize, usize)
Pattern matching friendly form of the dimension value. Read more
sourcepub fn into_pattern(self) -> <Dim<[usize; 5]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 5]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 5]>
pub fn zeros(ndim: usize) -> Dim<[usize; 5]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 5]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 5]> as Dimension>::Smaller
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 4]>
impl Dimension for Dim<[usize; 4]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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 Pattern = (usize, usize, usize, usize)
type Pattern = (usize, usize, usize, usize)
Pattern matching friendly form of the dimension value. Read more
sourcepub fn into_pattern(self) -> <Dim<[usize; 4]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 4]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 4]>
pub fn zeros(ndim: usize) -> Dim<[usize; 4]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 4]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 4]> as Dimension>::Smaller
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 1]>
impl Dimension for Dim<[usize; 1]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn into_pattern(self) -> <Dim<[usize; 1]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 1]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 1]>
pub fn zeros(ndim: usize) -> Dim<[usize; 1]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn next_for(&self, index: Dim<[usize; 1]>) -> Option<Dim<[usize; 1]>>
pub fn equal(&self, rhs: &Dim<[usize; 1]>) -> bool
sourcepub fn size_checked(&self) -> Option<usize>
pub fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
pub fn default_strides(&self) -> Dim<[usize; 1]>
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 1]>
pub fn min_stride_axis(&self, &Dim<[usize; 1]>) -> Axis
pub fn max_stride_axis(&self, &Dim<[usize; 1]>) -> Axis
pub fn first_index(&self) -> Option<Dim<[usize; 1]>>
pub fn stride_offset(index: &Dim<[usize; 1]>, stride: &Dim<[usize; 1]>) -> isize
pub fn stride_offset_checked(
&self,
stride: &Dim<[usize; 1]>,
index: &Dim<[usize; 1]>
) -> Option<isize>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 1]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 1]> as Dimension>::Smaller
pub fn from_dimension<D2>(d: &D2) -> Option<Dim<[usize; 1]>> where
D2: Dimension,
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 0]>
impl Dimension for Dim<[usize; 0]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 0]>
sourcepub fn into_pattern(self) -> <Dim<[usize; 0]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 0]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 0]>
pub fn zeros(ndim: usize) -> Dim<[usize; 0]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn next_for(&self, _index: Dim<[usize; 0]>) -> Option<Dim<[usize; 0]>>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 0]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
_ignore: Axis
) -> <Dim<[usize; 0]> as Dimension>::Smaller
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<IxDynImpl>
impl Dimension for Dim<IxDynImpl>
IxDyn is a “dynamic” index, pretty hard to use when indexing, and memory wasteful, but it allows an arbitrary and dynamic number of axes.
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn into_pattern(self) -> <Dim<IxDynImpl> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<IxDynImpl> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
sourcepub fn zeros(ndim: usize) -> Dim<IxDynImpl>
pub fn zeros(ndim: usize) -> Dim<IxDynImpl>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn insert_axis(&self, axis: Axis) -> <Dim<IxDynImpl> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<IxDynImpl> as Dimension>::Smaller
pub fn from_dimension<D2>(d: &D2) -> Option<Dim<IxDynImpl>> where
D2: Dimension,
sourcepub fn into_dyn(self) -> Dim<IxDynImpl>
pub fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 2]>
impl Dimension for Dim<[usize; 2]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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
sourcepub fn into_pattern(self) -> <Dim<[usize; 2]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 2]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 2]>
pub fn zeros(ndim: usize) -> Dim<[usize; 2]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn next_for(&self, index: Dim<[usize; 2]>) -> Option<Dim<[usize; 2]>>
pub fn equal(&self, rhs: &Dim<[usize; 2]>) -> bool
sourcepub fn size_checked(&self) -> Option<usize>
pub fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
pub fn last_elem(&self) -> usize
pub fn set_last_elem(&mut self, i: usize)
pub fn default_strides(&self) -> Dim<[usize; 2]>
pub fn fortran_strides(&self) -> Dim<[usize; 2]>
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 2]>
pub fn min_stride_axis(&self, strides: &Dim<[usize; 2]>) -> Axis
pub fn first_index(&self) -> Option<Dim<[usize; 2]>>
pub fn stride_offset(
index: &Dim<[usize; 2]>,
strides: &Dim<[usize; 2]>
) -> isize
pub fn stride_offset_checked(
&self,
strides: &Dim<[usize; 2]>,
index: &Dim<[usize; 2]>
) -> Option<isize>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 2]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 2]> as Dimension>::Smaller
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl Dimension for Dim<[usize; 6]>
impl Dimension for Dim<[usize; 6]>
sourcepub const NDIM: Option<usize>
pub const NDIM: Option<usize>
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 Pattern = (usize, usize, usize, usize, usize, usize)
type Pattern = (usize, usize, usize, usize, usize, usize)
Pattern matching friendly form of the dimension value. Read more
sourcepub fn into_pattern(self) -> <Dim<[usize; 6]> as Dimension>::Pattern
pub fn into_pattern(self) -> <Dim<[usize; 6]> as Dimension>::Pattern
Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]
pub fn slice_mut(&mut self) -> &mut [usize]
sourcepub fn zeros(ndim: usize) -> Dim<[usize; 6]>
pub fn zeros(ndim: usize) -> Dim<[usize; 6]>
Creates a dimension of all zeros with the specified ndim. Read more
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 6]> as Dimension>::Larger
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 6]> as Dimension>::Smaller
sourcefn size_checked(&self) -> Option<usize>
fn size_checked(&self) -> Option<usize>
Compute the size while checking for overflow.
sourcefn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
Borrow as a read-only array view.
sourcefn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
Borrow as a read-write array view.
sourcefn into_dyn(self) -> Dim<IxDynImpl>
fn into_dyn(self) -> Dim<IxDynImpl>
Convert the dimensional into a dynamic dimensional (IxDyn).
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<'a, I> MulAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<'a, I> MulAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn mul_assign(&mut self, rhs: &Dim<I>)
pub fn mul_assign(&mut self, rhs: &Dim<I>)
Performs the *=
operation. Read more
sourceimpl<I> MulAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<I> MulAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn mul_assign(&mut self, rhs: Dim<I>)
pub fn mul_assign(&mut self, rhs: Dim<I>)
Performs the *=
operation. Read more
sourceimpl<I> MulAssign<usize> for Dim<I> where
Dim<I>: Dimension,
impl<I> MulAssign<usize> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn mul_assign(&mut self, rhs: usize)
pub fn mul_assign(&mut self, rhs: usize)
Performs the *=
operation. Read more
sourceimpl RemoveAxis for Dim<IxDynImpl>
impl RemoveAxis for Dim<IxDynImpl>
pub fn remove_axis(&self, axis: Axis) -> Dim<IxDynImpl>
sourceimpl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Dim<[usize; 0]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Dim<[usize; 0]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Dim<[usize; 1]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Dim<[usize; 1]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Dim<[usize; 2]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Dim<[usize; 2]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Dim<[usize; 3]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Dim<[usize; 3]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Dim<[usize; 4]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Dim<[usize; 4]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Dim<[usize; 5]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Dim<[usize; 5]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Dim<[usize; 6]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
impl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Dim<[usize; 6]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
T: AsRef<[SliceInfoElem]>,
Din: Dimension,
Dout: Dimension,
impl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
T: AsRef<[SliceInfoElem]>,
Din: Dimension,
Dout: Dimension,
type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem]
impl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem]
sourcefn __private__(&self) -> PrivateMarker
fn __private__(&self) -> PrivateMarker
This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
sourceimpl<'a, I> SubAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<'a, I> SubAssign<&'a Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn sub_assign(&mut self, rhs: &Dim<I>)
pub fn sub_assign(&mut self, rhs: &Dim<I>)
Performs the -=
operation. Read more
sourceimpl<I> SubAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
impl<I> SubAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
sourcepub fn sub_assign(&mut self, rhs: Dim<I>)
pub fn sub_assign(&mut self, rhs: Dim<I>)
Performs the -=
operation. Read more
sourceimpl SubAssign<usize> for Dim<[usize; 1]>
impl SubAssign<usize> for Dim<[usize; 1]>
sourcepub fn sub_assign(&mut self, rhs: usize)
pub fn sub_assign(&mut self, rhs: usize)
Performs the -=
operation. Read more
impl<I> Copy for Dim<I> where
I: Copy + ?Sized,
impl<I> Eq for Dim<I> where
I: Eq + ?Sized,
impl<I> StructuralEq for Dim<I> where
I: ?Sized,
impl<I> StructuralPartialEq for Dim<I> where
I: ?Sized,
Auto Trait Implementations
impl<I: ?Sized> RefUnwindSafe for Dim<I> where
I: RefUnwindSafe,
impl<I: ?Sized> Send for Dim<I> where
I: Send,
impl<I: ?Sized> Sync for Dim<I> where
I: Sync,
impl<I: ?Sized> Unpin for Dim<I> where
I: Unpin,
impl<I: ?Sized> UnwindSafe for Dim<I> where
I: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<D> DimMax<D> for D where
D: Dimension,
impl<D> DimMax<D> for D where
D: Dimension,
type Output = D
type Output = D
The resulting dimension type after broadcasting.
sourceimpl<D> IntoDimension for D where
D: Dimension,
impl<D> IntoDimension for D where
D: Dimension,
type Dim = D
pub fn into_dimension(self) -> D
sourceimpl<D> NdIndex<D> for D where
D: Dimension,
impl<D> NdIndex<D> for D where
D: Dimension,
pub fn index_checked(&self, dim: &D, strides: &D) -> Option<isize>
pub fn index_unchecked(&self, strides: &D) -> isize
sourceimpl<T> ShapeArg for T where
T: IntoDimension,
impl<T> ShapeArg for T where
T: IntoDimension,
sourceimpl<T> ShapeBuilder for T where
T: IntoDimension,
impl<T> ShapeBuilder for T where
T: IntoDimension,
type Dim = <T as IntoDimension>::Dim
type Strides = T
pub fn into_shape(self) -> Shape<<T as ShapeBuilder>::Dim>
pub fn f(self) -> Shape<<T as ShapeBuilder>::Dim>
pub fn set_f(self, is_f: bool) -> Shape<<T as ShapeBuilder>::Dim>
pub fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more