Struct faer_core::Mat

source ·
#[repr(C)]
pub struct Mat<T: 'static> { /* private fields */ }
Expand description

Owning matrix structure stored in column major format.

A matrix can be thought of as a 2D array of values. These values are stored in memory so that the columns are contiguous.

Note

Note that the matrix as a whole may not necessarily be contiguous. The implementation may add padding at the end of each column when overaligning each column can provide a performance gain.

Let us consider a 3×4 matrix

 0 │ 3 │ 6 │  9
───┼───┼───┼───
 1 │ 4 │ 7 │ 10
───┼───┼───┼───
 2 │ 5 │ 8 │ 11

The memory representation of such a matrix could look like the following:

0 1 2 X 3 4 5 X 6 7 8 X 9 10 11 X

where X represents padding elements.

Implementations§

source§

impl<T: 'static> Mat<T>

source

pub fn new() -> Self

Returns a new matrix with dimensions (0, 0). This does not allocate.

source

pub unsafe fn from_raw_parts( ptr: *mut T, nrows: usize, ncols: usize, row_capacity: usize, col_capacity: usize ) -> Self

Returns a matrix from preallocated pointer, dimensions, and capacities.

Safety

The inputs to this function must be acquired from the return value of some previous call to Self::into_raw_parts.

source

pub fn into_raw_parts(self) -> (*mut T, usize, usize, usize, usize)

Consumes self and returns its raw parts in this order: pointer to data, number of rows, number of columns, row capacity and column capacity.

source

pub fn with_capacity(row_capacity: usize, col_capacity: usize) -> Self

Returns a new matrix with dimensions (0, 0), with enough capacity to hold a maximum of row_capacity rows and col_capacity columns without reallocating. If either is 0, the matrix will not allocate.

Panics

Panics if the total capacity in bytes exceeds isize::MAX.

source

pub fn with_dims( f: impl FnMut(usize, usize) -> T, nrows: usize, ncols: usize ) -> Self

Returns a new matrix with dimensions (nrows, ncols), filled with the provided function.

Panics

Panics if the total capacity in bytes exceeds isize::MAX.

source

pub fn zeros(nrows: usize, ncols: usize) -> Selfwhere T: ComplexField,

Returns a new matrix with dimensions (nrows, ncols), filled with zeros.

Panics

Panics if the total capacity in bytes exceeds isize::MAX.

source

pub unsafe fn set_dims(&mut self, nrows: usize, ncols: usize)

Set the dimensions of the matrix.

Safety
  • nrows must be less than self.row_capacity().
  • ncols must be less than self.col_capacity().
  • The elements that were previously out of bounds but are now in bounds must be initialized.
source

pub fn as_ptr(&self) -> *const T

Returns a pointer to the data of the matrix.

source

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

Returns a mutable pointer to the data of the matrix.

source

pub fn nrows(&self) -> usize

Returns the number of rows of the matrix.

source

pub fn ncols(&self) -> usize

Returns the number of columns of the matrix.

source

pub fn row_capacity(&self) -> usize

Returns the row capacity, that is, the number of rows that the matrix is able to hold without needing to reallocate, excluding column insertions.

source

pub fn col_capacity(&self) -> usize

Returns the column capacity, that is, the number of columns that the matrix is able to hold without needing to reallocate, excluding row insertions.

source

pub fn row_stride(&self) -> isize

Returns the offset between the first elements of two successive rows in the matrix. Always returns 1 since the matrix is column major.

source

pub fn col_stride(&self) -> isize

Returns the offset between the first elements of two successive columns in the matrix.

source

pub fn reserve_exact(&mut self, row_capacity: usize, col_capacity: usize)

Reserves the minimum capacity for row_capacity rows and col_capacity columns without reallocating. Does nothing if the capacity is already sufficient.

Panics

Panics if the new total capacity in bytes exceeds isize::MAX.

source

pub fn resize_with( &mut self, f: impl FnMut(usize, usize) -> T, new_nrows: usize, new_ncols: usize )

Resizes the matrix in-place so that the new dimensions are (new_nrows, new_ncols). Elements that are now out of bounds are dropped, while new elements are created with the given function f, so that elements at position (i, j) are created by calling f(i, j).

source

pub fn transpose(&self) -> MatRef<'_, T>

Returns the transpose of self.

source

pub fn conjugate(&self) -> MatRef<'_, T::Conj>where T: Conjugate,

Returns the conjugate of self.

source

pub fn adjoint(&self) -> MatRef<'_, T::Conj>where T: Conjugate,

Returns the conjugate transpose of self.

source

pub fn as_ref(&self) -> MatRef<'_, T>

Returns a view over the matrix.

source

pub fn as_mut(&mut self) -> MatMut<'_, T>

Returns a mutable view over the matrix.

Trait Implementations§

source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<&'a Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'a Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<&'a Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'a Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<&'a Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'a Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<&'a Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &'a Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: Conjugate, U: Conjugate<Num = T::Num>> Add<Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: Mat<U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<MatMut<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<MatMut<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<MatRef<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the + operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Add<MatRef<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the + operation. Read more
source§

impl<T: Clone> Clone for Mat<T>

source§

fn clone(&self) -> Self

Returns a copy 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<T: Debug + 'static> Debug for Mat<T>

source§

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

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

impl<T: 'static> Default for Mat<T>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<T> Drop for Mat<T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<T> Index<(usize, usize)> for Mat<T>

§

type Output = T

The returned type after indexing.
source§

fn index(&self, (i, j): (usize, usize)) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<T> IndexMut<(usize, usize)> for Mat<T>

source§

fn index_mut(&mut self, (i, j): (usize, usize)) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<&'a Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<&'a Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<&'a Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<&'a Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &'a Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<Complex<f32>>> for c32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<c32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<Complex<f32>>> for f32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<c32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<Complex<f64>>> for c64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<Complex<f64>>> for f64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<ComplexConj<f32>>> for c32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<ComplexConj<f32>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<ComplexConj<f32>>> for f32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<ComplexConj<f32>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<ComplexConj<f64>>> for c64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<ComplexConj<f64>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<ComplexConj<f64>>> for f64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<ComplexConj<f64>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<f32>> for f32

§

type Output = Mat<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Mat<f64>> for f64

§

type Output = Mat<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Mat<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Complex<f32>> for &Mat<ComplexConj<f32>>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f32>> for &Mat<c32>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f32>> for Mat<ComplexConj<f32>>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f32>> for Mat<c32>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f64>> for &Mat<ComplexConj<f64>>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f64>> for &Mat<c64>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f64>> for Mat<ComplexConj<f64>>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f64>> for Mat<c64>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Mat<Complex<f32>>> for c32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<c32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<Complex<f32>>> for f32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<c32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<Complex<f64>>> for c64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<Complex<f64>>> for f64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<ComplexConj<f32>>> for c32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<ComplexConj<f32>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<ComplexConj<f32>>> for f32

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<ComplexConj<f32>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<ComplexConj<f64>>> for c64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<ComplexConj<f64>>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<ComplexConj<f64>>> for f64

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<ComplexConj<f64>>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<T: Conjugate, U: Conjugate<Num = T::Num>> Mul<Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<U>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<f32>> for f32

§

type Output = Mat<f32>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<f32>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Mat<f64>> for f64

§

type Output = Mat<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Mat<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<MatMut<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<MatMut<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<MatRef<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Mul<MatRef<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<f32> for &Mat<ComplexConj<f32>>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f32> for &Mat<c32>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f32> for &Mat<f32>

§

type Output = Mat<f32>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f32> for Mat<ComplexConj<f32>>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f32> for Mat<c32>

§

type Output = Mat<Complex<f32>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f32> for Mat<f32>

§

type Output = Mat<f32>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for &Mat<ComplexConj<f64>>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for &Mat<c64>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for &Mat<f64>

§

type Output = Mat<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for Mat<ComplexConj<f64>>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for Mat<c64>

§

type Output = Mat<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for Mat<f64>

§

type Output = Mat<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<U, T: PartialEq<U>> PartialEq<Mat<U>> for Mat<T>

source§

fn eq(&self, other: &Mat<U>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Copy + Mul<U::Num, Output = U::Num>, U: Conjugate> Scale<&Mat<U>> for T

§

type Output = Mat<<U as Conjugate>::Num>

source§

fn scale(self, rhs: &Mat<U>) -> Self::Output

Scale a matrix rhs by self.
source§

impl<T: Copy + Mul<U::Num, Output = U::Num>, U: Conjugate> Scale<Mat<U>> for T

§

type Output = Mat<<U as Conjugate>::Num>

source§

fn scale(self, rhs: Mat<U>) -> Self::Output

Scale a matrix rhs by self.
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<&'a Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'a Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<&'a Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'a Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<&'a Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'a Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<&'a Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &'a Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<Mat<U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<Mat<U>> for &'a MatMut<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: Conjugate, U: Conjugate<Num = T::Num>> Sub<Mat<U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<Mat<U>> for MatRef<'a, T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Mat<U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<MatMut<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<MatMut<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'a, U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<MatRef<'a, U>> for &'a Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the - operation. Read more
source§

impl<'a, T: Conjugate, U: Conjugate<Num = T::Num>> Sub<MatRef<'a, U>> for Mat<T>where T::Num: ComplexField,

§

type Output = Mat<<T as Conjugate>::Num>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatRef<'a, U>) -> Self::Output

Performs the - operation. Read more
source§

impl<T: Send> Send for Mat<T>

source§

impl<T: Sync> Sync for Mat<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Mat<T>where T: RefUnwindSafe,

§

impl<T> Unpin for Mat<T>

§

impl<T> UnwindSafe for Mat<T>where T: RefUnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T> SameLayoutAs<T> for T