Trait concrete_core::math::tensor::AsMutTensor [−][src]
pub trait AsMutTensor: AsRefTensor<Element = Self::Element> { type Element; type Container: AsMutSlice<Element = <Self as AsMutTensor>::Element>; fn as_mut_tensor(&mut self) -> &mut Tensor<<Self as AsMutTensor>::Container>; }
Expand description
A trait for Tensor
-based types, allowing to mutably borrow the enclosed tensor.
This trait implements the same logic as AsRefTensor
, but for mutable borrow instead. See the
AsRefTensor
documentation for more explanations on the logic.
Associated Types
type Container: AsMutSlice<Element = <Self as AsMutTensor>::Element>
type Container: AsMutSlice<Element = <Self as AsMutTensor>::Element>
The container used by the tensor.
Required methods
fn as_mut_tensor(&mut self) -> &mut Tensor<<Self as AsMutTensor>::Container>
fn as_mut_tensor(&mut self) -> &mut Tensor<<Self as AsMutTensor>::Container>
Returns a mutable reference to the enclosed tensor.