Struct tract_core::internal::tract_ndarray::Dim [−][src]
pub struct Dim<I> where
I: ?Sized, { /* fields omitted */ }
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
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,
[src]pub fn add_assign(&mut self, rhs: &Dim<I>)
[src]
pub fn add_assign(&mut self, rhs: &Dim<I>)
[src]Performs the +=
operation. Read more
impl<I> AddAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> AddAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]pub fn add_assign(&mut self, rhs: Dim<I>)
[src]
pub fn add_assign(&mut self, rhs: Dim<I>)
[src]Performs the +=
operation. Read more
impl AddAssign<usize> for Dim<[usize; 1]>
[src]
impl AddAssign<usize> for Dim<[usize; 1]>
[src]pub fn add_assign(&mut self, rhs: usize)
[src]
pub fn add_assign(&mut self, rhs: usize)
[src]Performs the +=
operation. Read more
impl<D> DimAdd<D> for Dim<[usize; 0]> where
D: Dimension,
[src]
impl<D> DimAdd<D> for Dim<[usize; 0]> where
D: Dimension,
[src]type Output = D
type Output = D
The sum of the two dimensions.
impl Dimension for Dim<[usize; 1]>
[src]
impl Dimension for Dim<[usize; 1]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn into_pattern(self) -> <Dim<[usize; 1]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 1]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn zeros(ndim: usize) -> Dim<[usize; 1]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 1]>
[src]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]>>
[src]
pub fn equal(&self, rhs: &Dim<[usize; 1]>) -> bool
[src]
pub fn size_checked(&self) -> Option<usize>
[src]
pub fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
pub fn default_strides(&self) -> Dim<[usize; 1]>
[src]
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 1]>
[src]
pub fn min_stride_axis(&self, &Dim<[usize; 1]>) -> Axis
[src]
pub fn max_stride_axis(&self, &Dim<[usize; 1]>) -> Axis
[src]
pub fn first_index(&self) -> Option<Dim<[usize; 1]>>
[src]
pub fn stride_offset(index: &Dim<[usize; 1]>, stride: &Dim<[usize; 1]>) -> isize
[src]
pub fn stride_offset_checked(
&self,
stride: &Dim<[usize; 1]>,
index: &Dim<[usize; 1]>
) -> Option<isize>
[src]
&self,
stride: &Dim<[usize; 1]>,
index: &Dim<[usize; 1]>
) -> Option<isize>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 1]> as Dimension>::Larger
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 1]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 1]> as Dimension>::Smaller
pub fn from_dimension<D2>(d: &D2) -> Option<Dim<[usize; 1]>> where
D2: Dimension,
[src]
D2: Dimension,
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 4]>
[src]
impl Dimension for Dim<[usize; 4]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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
pub fn into_pattern(self) -> <Dim<[usize; 4]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 4]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 4]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 4]>
[src]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
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 4]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 4]> as Dimension>::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 5]>
[src]
impl Dimension for Dim<[usize; 5]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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
pub fn into_pattern(self) -> <Dim<[usize; 5]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 5]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 5]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 5]>
[src]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
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 5]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 5]> as Dimension>::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 3]>
[src]
impl Dimension for Dim<[usize; 3]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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
pub fn into_pattern(self) -> <Dim<[usize; 3]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 3]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 3]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 3]>
[src]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]>>
[src]
pub fn stride_offset(
index: &Dim<[usize; 3]>,
strides: &Dim<[usize; 3]>
) -> isize
[src]
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>
[src]
&self,
strides: &Dim<[usize; 3]>,
index: &Dim<[usize; 3]>
) -> Option<isize>
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 3]>
[src]
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 3]> as Dimension>::Larger
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 3]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 3]> as Dimension>::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<IxDynImpl>
[src]
impl Dimension for Dim<IxDynImpl>
[src]IxDyn is a “dynamic” index, pretty hard to use when indexing, and memory wasteful, but it allows an arbitrary and dynamic number of axes.
pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn into_pattern(self) -> <Dim<IxDynImpl> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<IxDynImpl> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn zeros(ndim: usize) -> Dim<IxDynImpl>
[src]
pub fn zeros(ndim: usize) -> Dim<IxDynImpl>
[src]Creates a dimension of all zeros with the specified ndim. Read more
pub fn insert_axis(&self, axis: Axis) -> <Dim<IxDynImpl> as Dimension>::Larger
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<IxDynImpl> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<IxDynImpl> as Dimension>::Smaller
pub fn from_dimension<D2>(d: &D2) -> Option<Dim<IxDynImpl>> where
D2: Dimension,
[src]
D2: Dimension,
pub fn into_dyn(self) -> Dim<IxDynImpl>
[src]
pub fn into_dyn(self) -> Dim<IxDynImpl>
[src]Convert the dimensional into a dynamic dimensional (IxDyn).
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 0]>
[src]
impl Dimension for Dim<[usize; 0]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 0]>
[src]
pub fn into_pattern(self) -> <Dim<[usize; 0]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 0]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn zeros(ndim: usize) -> Dim<[usize; 0]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 0]>
[src]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]>>
[src]
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 0]> as Dimension>::Larger
[src]
pub fn try_remove_axis(
&self,
_ignore: Axis
) -> <Dim<[usize; 0]> as Dimension>::Smaller
[src]
&self,
_ignore: Axis
) -> <Dim<[usize; 0]> as Dimension>::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 6]>
[src]
impl Dimension for Dim<[usize; 6]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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
pub fn into_pattern(self) -> <Dim<[usize; 6]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 6]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 6]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 6]>
[src]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
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 6]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 6]> as Dimension>::Smaller
fn size_checked(&self) -> Option<usize>
[src]
fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl Dimension for Dim<[usize; 2]>
[src]
impl Dimension for Dim<[usize; 2]>
[src]pub const NDIM: Option<usize>
[src]
pub const NDIM: Option<usize>
[src]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 into_pattern(self) -> <Dim<[usize; 2]> as Dimension>::Pattern
[src]
pub fn into_pattern(self) -> <Dim<[usize; 2]> as Dimension>::Pattern
[src]Convert the dimension into a pattern matching friendly value.
pub fn slice(&self) -> &[usize]ⓘ
[src]
pub fn slice_mut(&mut self) -> &mut [usize]ⓘ
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 2]>
[src]
pub fn zeros(ndim: usize) -> Dim<[usize; 2]>
[src]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]>>
[src]
pub fn equal(&self, rhs: &Dim<[usize; 2]>) -> bool
[src]
pub fn size_checked(&self) -> Option<usize>
[src]
pub fn size_checked(&self) -> Option<usize>
[src]Compute the size while checking for overflow.
pub fn last_elem(&self) -> usize
[src]
pub fn set_last_elem(&mut self, i: usize)
[src]
pub fn default_strides(&self) -> Dim<[usize; 2]>
[src]
pub fn fortran_strides(&self) -> Dim<[usize; 2]>
[src]
pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 2]>
[src]
pub fn min_stride_axis(&self, strides: &Dim<[usize; 2]>) -> Axis
[src]
pub fn first_index(&self) -> Option<Dim<[usize; 2]>>
[src]
pub fn stride_offset(
index: &Dim<[usize; 2]>,
strides: &Dim<[usize; 2]>
) -> isize
[src]
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>
[src]
&self,
strides: &Dim<[usize; 2]>,
index: &Dim<[usize; 2]>
) -> Option<isize>
pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 2]> as Dimension>::Larger
[src]
pub fn try_remove_axis(
&self,
axis: Axis
) -> <Dim<[usize; 2]> as Dimension>::Smaller
[src]
&self,
axis: Axis
) -> <Dim<[usize; 2]> as Dimension>::Smaller
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]
fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>
[src]Borrow as a read-only array view.
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]
fn as_array_view_mut(
&mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]Borrow as a read-write array view.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
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,
[src]pub fn mul_assign(&mut self, rhs: &Dim<I>)
[src]
pub fn mul_assign(&mut self, rhs: &Dim<I>)
[src]Performs the *=
operation. Read more
impl<I> MulAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> MulAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]pub fn mul_assign(&mut self, rhs: Dim<I>)
[src]
pub fn mul_assign(&mut self, rhs: Dim<I>)
[src]Performs the *=
operation. Read more
impl<I> MulAssign<usize> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> MulAssign<usize> for Dim<I> where
Dim<I>: Dimension,
[src]pub fn mul_assign(&mut self, rhs: usize)
[src]
pub fn mul_assign(&mut self, rhs: usize)
[src]Performs the *=
operation. Read more
impl RemoveAxis for Dim<IxDynImpl>
[src]
impl RemoveAxis for Dim<IxDynImpl>
[src]pub fn remove_axis(&self, axis: Axis) -> Dim<IxDynImpl>
[src]
impl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Dim<[usize; 0]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Dim<[usize; 0]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Dim<[usize; 1]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Dim<[usize; 1]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Dim<[usize; 2]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Dim<[usize; 2]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Dim<[usize; 3]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Dim<[usize; 3]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Dim<[usize; 4]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Dim<[usize; 4]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Dim<[usize; 5]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Dim<[usize; 5]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Dim<[usize; 6]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]
impl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Dim<[usize; 6]>, Dout> where
T: AsRef<[SliceInfoElem]>,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem]
[src]
impl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem]
[src]fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
impl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
T: AsRef<[SliceInfoElem]>,
Din: Dimension,
Dout: Dimension,
[src]
impl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
T: AsRef<[SliceInfoElem]>,
Din: Dimension,
Dout: Dimension,
[src]type OutDim = Dout
type OutDim = Dout
Dimensionality of the output array.
fn __private__(&self) -> PrivateMarker
[src]
fn __private__(&self) -> PrivateMarker
[src]This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more
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,
[src]pub fn sub_assign(&mut self, rhs: &Dim<I>)
[src]
pub fn sub_assign(&mut self, rhs: &Dim<I>)
[src]Performs the -=
operation. Read more
impl<I> SubAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]
impl<I> SubAssign<Dim<I>> for Dim<I> where
Dim<I>: Dimension,
[src]pub fn sub_assign(&mut self, rhs: Dim<I>)
[src]
pub fn sub_assign(&mut self, rhs: Dim<I>)
[src]Performs the -=
operation. Read more
impl SubAssign<usize> for Dim<[usize; 1]>
[src]
impl SubAssign<usize> for Dim<[usize; 1]>
[src]pub fn sub_assign(&mut self, rhs: usize)
[src]
pub fn sub_assign(&mut self, rhs: usize)
[src]Performs the -=
operation. Read more
impl<I> Copy for Dim<I> where
I: Copy + ?Sized,
[src]
I: Copy + ?Sized,
impl<I> Eq for Dim<I> where
I: Eq + ?Sized,
[src]
I: Eq + ?Sized,
impl<I> StructuralEq for Dim<I> where
I: ?Sized,
[src]
I: ?Sized,
impl<I> StructuralPartialEq for Dim<I> where
I: ?Sized,
[src]
I: ?Sized,
Auto Trait Implementations
impl<I: ?Sized> RefUnwindSafe for Dim<I> where
I: RefUnwindSafe,
I: RefUnwindSafe,
impl<I: ?Sized> Send for Dim<I> where
I: Send,
I: Send,
impl<I: ?Sized> Sync for Dim<I> where
I: Sync,
I: Sync,
impl<I: ?Sized> Unpin for Dim<I> where
I: Unpin,
I: Unpin,
impl<I: ?Sized> UnwindSafe for Dim<I> where
I: UnwindSafe,
I: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<D> DimMax<D> for D where
D: Dimension,
[src]
impl<D> DimMax<D> for D where
D: Dimension,
[src]type Output = D
type Output = D
The resulting dimension type after broadcasting.
impl<T> Downcast for T where
T: Any,
[src]
impl<T> Downcast for T where
T: Any,
[src]pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
F: Future + Unpin + ?Sized,
A: Allocator + 'static, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
[src]Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]
pub fn as_any(&self) -> &(dyn Any + 'static)
[src]Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]
impl<T> DowncastSync for T where
T: Any + Send + Sync,
[src]impl<D> IntoDimension for D where
D: Dimension,
[src]
impl<D> IntoDimension for D where
D: Dimension,
[src]impl<D> NdIndex<D> for D where
D: Dimension,
[src]
impl<D> NdIndex<D> for D where
D: Dimension,
[src]pub fn index_checked(&self, dim: &D, strides: &D) -> Option<isize>
[src]
pub fn index_unchecked(&self, strides: &D) -> isize
[src]
impl<T> ShapeArg for T where
T: IntoDimension,
[src]
impl<T> ShapeArg for T where
T: IntoDimension,
[src]impl<T> ShapeBuilder for T where
T: IntoDimension,
[src]
impl<T> ShapeBuilder for T where
T: IntoDimension,
[src]type Dim = <T as IntoDimension>::Dim
type Strides = T
pub fn into_shape(self) -> Shape<<T as ShapeBuilder>::Dim>
[src]
pub fn f(self) -> Shape<<T as ShapeBuilder>::Dim>
[src]
pub fn set_f(self, is_f: bool) -> Shape<<T as ShapeBuilder>::Dim>
[src]
pub fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more