Matrix

Struct Matrix 

Source
pub struct Matrix<R, S, D>
where R: Repr, S: DimTrait, D: DeviceBase,
{ /* private fields */ }

Implementations§

Source§

impl<T, S, D> Matrix<Owned<T>, S, D>
where T: Num, D: DeviceBase, S: DimTrait,

Source

pub fn alloc<I: Into<S>>(shape: I) -> Self

Source

pub fn alloc_like<R: Repr<Item = T>>(mat: &Matrix<R, S, D>) -> Self

Source§

impl<T, S, D> Matrix<Owned<T>, S, D>
where T: Num, D: DeviceBase, S: DimTrait,

Source

pub fn from_vec<I: Into<S>>(vec: Vec<T>, shape: I) -> Self

Source§

impl<T, S, D> Matrix<Owned<T>, S, D>
where T: Num, S: DimTrait, D: DeviceBase,

Source

pub fn ones<I: Into<S>>(dim: I) -> Self

Source

pub fn ones_like<R: Repr<Item = T>>(m: &Matrix<R, S, D>) -> Self

Source§

impl<T, S, D> Matrix<Owned<T>, S, D>
where T: Num, S: DimTrait, D: DeviceBase,

Source

pub fn zeros<I: Into<S>>(dim: I) -> Self

Source

pub fn zeros_like<R: Repr<Item = T>>(m: &Matrix<R, S, D>) -> Self

Source§

impl<R, S, D> Matrix<R, S, D>
where R: Repr, S: DimTrait, D: DeviceBase,

Source

pub fn offset(&self) -> usize

Source

pub fn shape_stride(&self) -> ShapeStride<S>

Source

pub fn shape(&self) -> S

Source

pub fn stride(&self) -> S

Source

pub fn is_default_stride(&self) -> bool

Source

pub fn is_transpose_default_stride(&self) -> bool

Source

pub fn as_ptr(&self) -> *const R::Item

Source

pub fn to_vec(&self) -> Vec<R::Item>
where R::Item: Clone,

this code retunrs a slice of the matrix WARNING: even if the matrix has offset, the slice will be created from the original pointer

Source

pub fn into_dyn_dim(self) -> Matrix<R, DimDyn, D>

Source

pub fn update_shape_stride(&mut self, shape_stride: ShapeStride<S>)

Source

pub fn update_shape(&mut self, shape: S)

Source

pub fn update_stride(&mut self, stride: S)

Source

pub fn into_dim<S2>(self) -> Matrix<R, S2, D>
where S2: DimTrait,

Source

pub fn slice<I>(&self, index: I) -> Matrix<Ref<&R::Item>, S, D>
where I: SliceTrait<Dim = S>,

Source

pub fn slice_dyn(&self, index: Slice) -> Matrix<Ref<&R::Item>, DimDyn, D>

Source

pub fn index_axis<I>(&self, index: I) -> Matrix<Ref<&R::Item>, S, D>

Source

pub fn index_axis_dyn<I>(&self, index: I) -> Matrix<Ref<&R::Item>, DimDyn, D>
where I: IndexAxisTrait,

Source

pub fn index_item<I: Into<S>>(&self, index: I) -> R::Item

Source

pub fn to_ref<'a>(&self) -> Matrix<Ref<&'a R::Item>, S, D>

Source

pub fn convert_dim_type<Dout: DimTrait>(self) -> Matrix<R, Dout, D>

Source

pub fn new_matrix(&self) -> Matrix<Owned<R::Item>, S, D>
where D: Device,

Source

pub fn try_to_scalar(&self) -> Result<R::Item, String>

Source

pub fn to_scalar(&self) -> R::Item

Source

pub fn as_slice(&self) -> &[R::Item]

Source

pub fn as_slice_unchecked(&self) -> &[R::Item]

Source§

impl<T, S, D> Matrix<Owned<T>, S, D>
where T: Num, D: DeviceBase, S: DimTrait,

Source

pub fn to_ref_mut<'a>(&mut self) -> Matrix<Ref<&'a mut T>, S, D>

Source

pub fn to<Dout: DeviceBase>(self) -> Matrix<Owned<T>, S, Dout>

Source§

impl<'a, T, S, D> Matrix<Ref<&'a mut T>, S, D>
where T: Num, D: DeviceBase, S: DimTrait,

Source

pub fn as_mut_ptr(&self) -> *mut T

Source

pub fn as_mut_slice(&self) -> &mut [T]

Source

pub fn as_mut_slice_unchecked(&self) -> &mut [T]

Source

pub fn each_by<F>(&mut self, f: F)
where F: FnMut(&mut T),

Source

pub fn slice_mut<I>(&self, index: I) -> Matrix<Ref<&'a mut T>, S, D>
where I: SliceTrait<Dim = S>,

Source

pub fn slice_mut_dyn(&self, index: Slice) -> Matrix<Ref<&'a mut T>, DimDyn, D>

Source

pub fn index_axis_mut<I>(&self, index: I) -> Matrix<Ref<&'a mut T>, S, D>

Source

pub fn index_axis_mut_dyn<I>( &self, index: I, ) -> Matrix<Ref<&'a mut T>, DimDyn, D>
where I: IndexAxisTrait,

Source

pub fn index_item_assign<I: Into<S>>(&self, index: I, value: T)

Source§

impl<R: Repr, D: Device> Matrix<R, DimDyn, D>

Source

pub fn add_axis(&mut self, axis: usize)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + Asum> Matrix<R, S, D>

Source

pub fn asum(&self) -> T

Source§

impl<T, D> Matrix<Ref<&mut T>, DimDyn, D>
where T: Num, D: DeviceBase + AddOps,

Source

pub fn add_scalar<OR: Repr<Item = T>>( &mut self, other: &Matrix<OR, DimDyn, D>, scalar: T, )

Source

pub fn add_scalar_assign(&mut self, scalar: T)

Source

pub fn add_assign(&mut self, other: &Matrix<Ref<&T>, DimDyn, D>)

Source

pub fn add_array<LR: Repr<Item = T>, RR: Repr<Item = T>>( &mut self, lhs: &Matrix<LR, DimDyn, D>, rhs: &Matrix<RR, DimDyn, D>, )

Source§

impl<T, D> Matrix<Ref<&mut T>, DimDyn, D>
where T: Num, D: DeviceBase + SubOps,

Source

pub fn sub_scalar<OR: Repr<Item = T>>( &mut self, other: &Matrix<OR, DimDyn, D>, scalar: T, )

Source

pub fn sub_scalar_assign(&mut self, scalar: T)

Source

pub fn sub_assign(&mut self, other: &Matrix<Ref<&T>, DimDyn, D>)

Source

pub fn sub_array<LR: Repr<Item = T>, RR: Repr<Item = T>>( &mut self, lhs: &Matrix<LR, DimDyn, D>, rhs: &Matrix<RR, DimDyn, D>, )

Source§

impl<T, D> Matrix<Ref<&mut T>, DimDyn, D>
where T: Num, D: DeviceBase + MulOps,

Source

pub fn mul_scalar<OR: Repr<Item = T>>( &mut self, other: &Matrix<OR, DimDyn, D>, scalar: T, )

Source

pub fn mul_scalar_assign(&mut self, scalar: T)

Source

pub fn mul_assign(&mut self, other: &Matrix<Ref<&T>, DimDyn, D>)

Source

pub fn mul_array<LR: Repr<Item = T>, RR: Repr<Item = T>>( &mut self, lhs: &Matrix<LR, DimDyn, D>, rhs: &Matrix<RR, DimDyn, D>, )

Source§

impl<T, D> Matrix<Ref<&mut T>, DimDyn, D>
where T: Num, D: DeviceBase + DivOps,

Source

pub fn div_scalar<OR: Repr<Item = T>>( &mut self, other: &Matrix<OR, DimDyn, D>, scalar: T, )

Source

pub fn div_scalar_assign(&mut self, scalar: T)

Source

pub fn div_assign(&mut self, other: &Matrix<Ref<&T>, DimDyn, D>)

Source

pub fn div_array<LR: Repr<Item = T>, RR: Repr<Item = T>>( &mut self, lhs: &Matrix<LR, DimDyn, D>, rhs: &Matrix<RR, DimDyn, D>, )

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + SinOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn sin_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn sin_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + SinOps> Matrix<R, S, D>

Source

pub fn sin(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + CosOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn cos_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn cos_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + CosOps> Matrix<R, S, D>

Source

pub fn cos(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + TanOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn tan_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn tan_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + TanOps> Matrix<R, S, D>

Source

pub fn tan(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + AsinOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn asin_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn asin_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + AsinOps> Matrix<R, S, D>

Source

pub fn asin(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + AcosOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn acos_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn acos_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + AcosOps> Matrix<R, S, D>

Source

pub fn acos(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + AtanOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn atan_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn atan_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + AtanOps> Matrix<R, S, D>

Source

pub fn atan(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + SinhOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn sinh_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn sinh_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + SinhOps> Matrix<R, S, D>

Source

pub fn sinh(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + CoshOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn cosh_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn cosh_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + CoshOps> Matrix<R, S, D>

Source

pub fn cosh(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + TanhOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn tanh_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn tanh_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + TanhOps> Matrix<R, S, D>

Source

pub fn tanh(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + AbsOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn abs_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn abs_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + AbsOps> Matrix<R, S, D>

Source

pub fn abs(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + SqrtOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn sqrt_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn sqrt_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + SqrtOps> Matrix<R, S, D>

Source

pub fn sqrt(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + ExpOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn exp_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn exp_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + ExpOps> Matrix<R, S, D>

Source

pub fn exp(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + LogOps> Matrix<Ref<&mut T>, S, D>

Source

pub fn log_array<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, )

Source

pub fn log_assign(&mut self)

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: DeviceBase + LogOps> Matrix<R, S, D>

Source

pub fn log(&self) -> Matrix<Owned<T>, S, D>

Source§

impl<R: Repr, S: DimTrait, D: DeviceBase + PowOws + CopyBlas> Matrix<R, S, D>

Source

pub fn powf_array(&self, scalar: R::Item) -> Matrix<Owned<R::Item>, S, D>

Source§

impl<T: Num, S: DimTrait, D: DeviceBase + PowOws + CopyBlas> Matrix<Ref<&mut T>, S, D>

Source

pub fn powf<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, scalar: T, )

Source

pub fn powf_assign(&self, scalar: T)

Source§

impl<T: Num, D: Device> Matrix<Ref<&mut T>, DimDyn, D>

Source

pub fn broadcast<R: Repr<Item = T>>(&self, source: &Matrix<R, DimDyn, D>)

Source§

impl<R: Repr, S: DimTrait, D: Device> Matrix<R, S, D>

Source

pub fn clip(&self, min: R::Item, max: R::Item) -> Matrix<Owned<R::Item>, S, D>

Source

pub fn clip_backward_mask( &self, min: R::Item, max: R::Item, ) -> Matrix<Owned<R::Item>, S, D>

Source§

impl<T: Num, D: Device> Matrix<Ref<&mut T>, DimDyn, D>

Source

pub fn clip_assign(&self, min: T, max: T)

Source

pub fn clip_backward_assign_mask(&self, min: T, max: T)

Source§

impl<T, SA, D> Matrix<Ref<&mut T>, SA, D>
where T: Num, SA: DimTrait, D: DeviceBase + CopyBlas,

Source

pub fn copy_from<R: Repr<Item = T>, SB: DimTrait>( &self, source: &Matrix<R, SB, D>, )

Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Matrix<R, DimDyn, D>

Source

pub fn max_idx(&self) -> DimDyn

Source

pub fn max_item(&self) -> T

Source

pub fn max_axis( &self, axis: usize, keep_dim: bool, ) -> Matrix<Owned<T>, DimDyn, D>

selfはdefault stride

Source

pub fn max_axis_idx_ravel(&self, axis: usize) -> Vec<usize>

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: Device> Matrix<R, S, D>

Source

pub fn mean( &self, axis: Option<usize>, keep_dim: bool, ) -> Matrix<Owned<T>, DimDyn, D>

Source§

impl<T: Num, S: DimTrait, D: Device> Matrix<Ref<&mut T>, S, D>

Source

pub fn relu<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, alpha: T, )

Source

pub fn relu_backward_mask<R: Repr<Item = T>, SO: DimTrait>( &self, other: &Matrix<R, SO, D>, alpha: T, )

Source§

impl<T: Num, R: Repr<Item = T>, S: DimTrait, D: Device> Matrix<R, S, D>

Source

pub fn reshape<I: Into<DimDyn>>( &self, new_shape: I, ) -> Matrix<Ref<&T>, DimDyn, D>

Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Matrix<R, DimDyn, D>

Source

pub fn reshape_new_matrix<I: Into<DimDyn>>( &self, new_shape: I, ) -> Matrix<Owned<T>, DimDyn, D>

Source§

impl<T: Num, S: DimTrait, D: Device> Matrix<Owned<T>, S, D>

Source

pub fn reshape_mut<I: Into<DimDyn>>( &mut self, new_shape: I, ) -> Matrix<Ref<&mut T>, DimDyn, D>

Source§

impl<T: Num, S: DimTrait, D: Device> Matrix<Owned<T>, S, D>

Source

pub fn reshape_no_alloc_owned<I: Into<DimDyn>>( self, new_shape: I, ) -> Matrix<Owned<T>, DimDyn, D>

Source§

impl<T: Num, D: Device> Matrix<Ref<&mut T>, DimDyn, D>

Source

pub fn softmax_assign<R: Repr<Item = T>>( &self, source: &Matrix<R, DimDyn, D>, axis: usize, )

Source§

impl<T: Num, D: Device> Matrix<Ref<&T>, DimDyn, D>

Source

pub fn sum(&self, axis: usize, keep_dim: bool) -> Matrix<Owned<T>, DimDyn, D>

Source§

impl<R: Repr, S: DimTrait, D: Device> Matrix<R, S, D>

Source

pub fn to_default_stride(&self) -> Matrix<Owned<R::Item>, S, D>

Source§

impl<R: Repr, D: Device> Matrix<R, DimDyn, D>

Source

pub fn transpose(&mut self)

Source

pub fn transpose_by_index(&mut self, index: &[usize])

Source

pub fn transpose_by_index_new_matrix( &self, index: &[usize], ) -> Matrix<Owned<R::Item>, DimDyn, D>

Source

pub fn transpose_swap_index(&mut self, a: usize, b: usize)

Source

pub fn transpose_swap_index_new_matrix( &self, a: usize, b: usize, ) -> Matrix<Owned<R::Item>, DimDyn, D>

Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Matrix<R, DimDyn, D>

Source

pub fn variance( &self, axis: Option<usize>, keep_dim: bool, ) -> Matrix<Owned<T>, DimDyn, D>

Trait Implementations§

Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Add<&Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Add<&Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Add<Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Add<Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Add<T> for &Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Add<T> for Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: T) -> Self::Output

Performs the + operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, SO: DimTrait, D: Device> AddAssign<Matrix<R, SO, D>> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn add_assign(&mut self, rhs: Matrix<R, SO, D>)

Performs the += operation. Read more
Source§

impl<T: Num, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> AddAssign<Matrix<RO, SO, D>> for Matrix<Owned<T>, SS, D>

Source§

fn add_assign(&mut self, rhs: Matrix<RO, SO, D>)

Performs the += operation. Read more
Source§

impl<T: Num, S: DimTrait, D: Device> AddAssign<T> for Matrix<Owned<T>, S, D>

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl<T: Num, D: Device> AddAssign<T> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn add_assign(&mut self, rhs: T)

Performs the += operation. Read more
Source§

impl<R, S, D> Clone for Matrix<R, S, D>
where R: Repr, S: DimTrait, D: DeviceBase,

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A, R, S, D> Debug for Matrix<R, S, D>
where A: Num + Debug, R: Repr<Item = A>, S: DimTrait, D: DeviceBase,

Format the array using Debug and apply the formatting parameters used to each element.

The array is shown in multiline style.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de, T: Num + Deserialize<'de>, D: Device> Deserialize<'de> for Matrix<Owned<T>, DimDyn, D>

Source§

fn deserialize<Ds>(deserializer: Ds) -> Result<Self, Ds::Error>
where Ds: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<A, R, S, D> Display for Matrix<R, S, D>
where A: Num + Display, R: Repr<Item = A>, S: DimTrait, D: DeviceBase,

Format the array using Display and apply the formatting parameters used to each element.

The array is shown in multiline style.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Div<&Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Div<&Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Div<Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Div<Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Div<T> for &Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Div<T> for Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: T) -> Self::Output

Performs the / operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, SO: DimTrait, D: Device> DivAssign<Matrix<R, SO, D>> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn div_assign(&mut self, rhs: Matrix<R, SO, D>)

Performs the /= operation. Read more
Source§

impl<T: Num, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> DivAssign<Matrix<RO, SO, D>> for Matrix<Owned<T>, SS, D>

Source§

fn div_assign(&mut self, rhs: Matrix<RO, SO, D>)

Performs the /= operation. Read more
Source§

impl<T: Num, S: DimTrait, D: Device> DivAssign<T> for Matrix<Owned<T>, S, D>

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T: Num, D: Device> DivAssign<T> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn div_assign(&mut self, rhs: T)

Performs the /= operation. Read more
Source§

impl<T: Num, D: Device> MatrixIter<T, D> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn map_axis<F>(&self, axis: usize, fn_map: F) -> Matrix<Owned<T>, DimDyn, D>
where F: FnMut(Matrix<Ref<&mut T>, DimDyn, D>),

Source§

fn map_axis_mut<F>(self, axis: usize, fn_map: F)
where F: FnMut(Matrix<Ref<&mut T>, DimDyn, D>),

Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Mul<&Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Mul<&Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Mul<Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Mul<Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Mul<T> for &Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Mul<T> for Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: T) -> Self::Output

Performs the * operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, SO: DimTrait, D: Device> MulAssign<Matrix<R, SO, D>> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn mul_assign(&mut self, rhs: Matrix<R, SO, D>)

Performs the *= operation. Read more
Source§

impl<T: Num, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> MulAssign<Matrix<RO, SO, D>> for Matrix<Owned<T>, SS, D>

Source§

fn mul_assign(&mut self, rhs: Matrix<RO, SO, D>)

Performs the *= operation. Read more
Source§

impl<T: Num, S: DimTrait, D: Device> MulAssign<T> for Matrix<Owned<T>, S, D>

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<T: Num, D: Device> MulAssign<T> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn mul_assign(&mut self, rhs: T)

Performs the *= operation. Read more
Source§

impl<R: Repr, D: Device> Serialize for Matrix<R, DimDyn, D>

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Sub<&Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Sub<&Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Matrix<RO, SO, D>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Sub<Matrix<RO, SO, D>> for &Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, RS: Repr<Item = T>, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> Sub<Matrix<RO, SO, D>> for Matrix<RS, SS, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Matrix<RO, SO, D>) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Sub<T> for &Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, D: Device> Sub<T> for Matrix<R, DimDyn, D>

Source§

type Output = Matrix<Owned<T>, DimDyn, D>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: T) -> Self::Output

Performs the - operation. Read more
Source§

impl<T: Num, R: Repr<Item = T>, SO: DimTrait, D: Device> SubAssign<Matrix<R, SO, D>> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn sub_assign(&mut self, rhs: Matrix<R, SO, D>)

Performs the -= operation. Read more
Source§

impl<T: Num, SS: DimTrait, RO: Repr<Item = T>, SO: DimTrait, D: Device> SubAssign<Matrix<RO, SO, D>> for Matrix<Owned<T>, SS, D>

Source§

fn sub_assign(&mut self, rhs: Matrix<RO, SO, D>)

Performs the -= operation. Read more
Source§

impl<T: Num, S: DimTrait, D: Device> SubAssign<T> for Matrix<Owned<T>, S, D>

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more
Source§

impl<T: Num, D: Device> SubAssign<T> for Matrix<Ref<&mut T>, DimDyn, D>

Source§

fn sub_assign(&mut self, rhs: T)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<R, S, D> Freeze for Matrix<R, S, D>
where S: Freeze,

§

impl<R, S, D> RefUnwindSafe for Matrix<R, S, D>

§

impl<R, S, D> !Send for Matrix<R, S, D>

§

impl<R, S, D> !Sync for Matrix<R, S, D>

§

impl<R, S, D> Unpin for Matrix<R, S, D>
where S: Unpin, R: Unpin, D: Unpin,

§

impl<R, S, D> UnwindSafe for Matrix<R, S, D>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,