pub struct Index2D(pub usize);
Tuple Fields§
§0: usize
Implementations§
Source§impl Index2D
impl Index2D
pub fn new(index: usize) -> Self
pub fn index(&self) -> usize
pub fn target_dim(&self) -> usize
pub fn get_shape_stride<Din: DimTrait, Dout: DimTrait>( &self, shape: &Din, stride: &Din, ) -> ShapeStride<Dout>
pub fn get_offset<D: DimTrait>(&self, stride: D) -> usize
Trait Implementations§
Source§impl IndexAxisTrait for Index2D
impl IndexAxisTrait for Index2D
impl Copy for Index2D
impl StructuralPartialEq for Index2D
Auto Trait Implementations§
impl Freeze for Index2D
impl RefUnwindSafe for Index2D
impl Send for Index2D
impl Sync for Index2D
impl Unpin for Index2D
impl UnwindSafe for Index2D
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