pub enum DynRank {
Dyn(Box<[usize]>),
One(usize),
}Expand description
Array shape type with dynamic rank.
If the rank is 0 or 1, no heap allocation is necessary. The default value will have rank 1 and contain no elements.
Variants§
Implementations§
Trait Implementations§
Source§impl Ord for DynRank
impl Ord for DynRank
Source§impl PartialOrd for DynRank
impl PartialOrd for DynRank
Source§impl Permutation for DynRank
impl Permutation for DynRank
Source§impl Shape for DynRank
impl Shape for DynRank
Source§type Merge<S: Shape> = DynRank
type Merge<S: Shape> = DynRank
Merge each dimension pair, where constant size is preferred over dynamic.
The result has dynamic rank if at least one of the inputs has dynamic rank.
Source§type Layout<L: Layout> = Strided
type Layout<L: Layout> = Strided
Select layout
L for rank 0, or Strided for rank >0 or dynamic.Source§fn dim(&self, index: usize) -> usize
fn dim(&self, index: usize) -> usize
Returns the number of elements in the specified dimension. Read more
impl Eq for DynRank
Auto Trait Implementations§
impl Freeze for DynRank
impl RefUnwindSafe for DynRank
impl Send for DynRank
impl Sync for DynRank
impl Unpin for DynRank
impl UnwindSafe for DynRank
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more