pub struct TensorMut<'a, Shape: TensorShape>(/* private fields */);Implementations§
Source§impl<'a, Shape> TensorMut<'a, Shape>where
Shape: TensorShape,
impl<'a, Shape> TensorMut<'a, Shape>where
Shape: TensorShape,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn rank(&self) -> usize
pub fn as_slice(&self) -> &[Float] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [Float] ⓘ
pub fn at(&self, index: [usize; Shape::RANK]) -> &Float
pub fn set(&mut self, index: [usize; Shape::RANK], value: Float)
pub fn fill(&mut self, value: Float)
pub fn sum(&self) -> Float
pub fn mean(&self) -> Float
pub fn reshape<NewShape>(self) -> TensorMut<'a, NewShape>where
NewShape: TensorShape,
(): ReshapePreservesElementCount<{ Shape::SIZE }, { NewShape::SIZE }>,
Trait Implementations§
Auto Trait Implementations§
impl<'a, Shape> Freeze for TensorMut<'a, Shape>
impl<'a, Shape> RefUnwindSafe for TensorMut<'a, Shape>where
Shape: RefUnwindSafe,
impl<'a, Shape> Send for TensorMut<'a, Shape>where
Shape: Send,
impl<'a, Shape> Sync for TensorMut<'a, Shape>where
Shape: Sync,
impl<'a, Shape> Unpin for TensorMut<'a, Shape>where
Shape: Unpin,
impl<'a, Shape> UnsafeUnpin for TensorMut<'a, Shape>
impl<'a, Shape> !UnwindSafe for TensorMut<'a, Shape>
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