pub struct Typed<T>(/* private fields */);Expand description
The statically typed representation for scalar T.
§Examples
use tenferro_tensor::{Repr, Tensor, Typed};
let t = Tensor::from_vec_col_major(vec![1], vec![1.0_f64])?;
let typed = <Typed<f64> as Repr>::wrap_value(t)?;
assert_eq!(typed.shape(), &[1]);Trait Implementations§
impl<T> Copy for Typed<T>
Source§impl<T: TensorScalar> Repr for Typed<T>
impl<T: TensorScalar> Repr for Typed<T>
Source§type Value = TypedTensor<T>
type Value = TypedTensor<T>
The value type:
Tensor or TypedTensor<T>.Source§type Write<'a> = TypedTensorWrite<'a, T>
type Write<'a> = TypedTensorWrite<'a, T>
The writable target type:
TensorWrite<'a> or TypedTensorWrite<'a, T>.Source§fn wrap_value(t: Tensor) -> Result<TypedTensor<T>>
fn wrap_value(t: Tensor) -> Result<TypedTensor<T>>
Wrap an erased result in this representation. Typed representations
perform a checked downcast. Read more
Source§fn erase_write<'a>(w: Self::Write<'a>) -> TensorWrite<'a>
fn erase_write<'a>(w: Self::Write<'a>) -> TensorWrite<'a>
Erase a writable target to
TensorWrite. Metadata only. Read moreAuto Trait Implementations§
impl<T> Freeze for Typed<T>
impl<T> RefUnwindSafe for Typed<T>
impl<T> Send for Typed<T>
impl<T> Sync for Typed<T>
impl<T> Unpin for Typed<T>
impl<T> UnsafeUnpin for Typed<T>
impl<T> UnwindSafe for Typed<T>
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