Struct faer_core::MatMut

source ·
pub struct MatMut<'a, E: Entity> { /* private fields */ }
Expand description

Mutable view over a matrix, similar to a mutable reference to a 2D strided slice.

Note

Unlike a slice, the data pointed to by MatMut<'_, E> is allowed to be partially or fully uninitialized under certain conditions. In this case, care must be taken to not perform any operations that read the uninitialized values, or form references to them, either directly through MatMut::read, or indirectly through any of the numerical library routines, unless it is explicitly permitted.

Move semantics

Since MatMut mutably borrows data, it cannot be Copy. This means that if we pass a MatMut to a function that takes it by value, or use a method that consumes self like MatMut::transpose, this renders the original variable unusable.

use faer_core::{Mat, MatMut};

fn takes_matmut(view: MatMut<'_, f64>) {}

let mut matrix = Mat::new();
let view = matrix.as_mut();

takes_matmut(view); // `view` is moved (passed by value)
takes_matmut(view); // this fails to compile since `view` was moved

The way to get around it is to use the reborrow::ReborrowMut trait, which allows us to mutably borrow a MatMut to obtain another MatMut for the lifetime of the borrow. It’s also similarly possible to immutably borrow a MatMut to obtain a MatRef for the lifetime of the borrow, using reborrow::Reborrow.

use faer_core::{Mat, MatMut, MatRef};
use reborrow::*;

fn takes_matmut(view: MatMut<'_, f64>) {}
fn takes_matref(view: MatRef<'_, f64>) {}

let mut matrix = Mat::new();
let mut view = matrix.as_mut();

takes_matmut(view.rb_mut());
takes_matmut(view.rb_mut());
takes_matref(view.rb());
// view is still usable here

Implementations§

source§

impl<'a, E: Entity> MatMut<'a, E>

source

pub fn from_column_major_slice( slice: GroupFor<E, &'a mut [E::Unit]>, nrows: usize, ncols: usize ) -> Self

Creates a MatMut from slice views over the matrix data, and the matrix dimensions. The data is interpreted in a column-major format, so that the first chunk of nrows values from the slices goes in the first column of the matrix, the second chunk of nrows values goes in the second column, and so on.

Panics

The function panics if any of the following conditions are violated:

  • nrows * ncols == slice.len()
Example
use faer_core::{mat, MatMut};

let mut slice = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0_f64];
let view = MatMut::<f64>::from_column_major_slice(&mut slice, 3, 2);

let expected = mat![[1.0, 4.0], [2.0, 5.0], [3.0, 6.0]];
assert_eq!(expected, view);
source

pub fn from_row_major_slice( slice: GroupFor<E, &'a mut [E::Unit]>, nrows: usize, ncols: usize ) -> Self

Creates a MatMut from slice views over the matrix data, and the matrix dimensions. The data is interpreted in a row-major format, so that the first chunk of ncols values from the slices goes in the first column of the matrix, the second chunk of ncols values goes in the second column, and so on.

Panics

The function panics if any of the following conditions are violated:

  • nrows * ncols == slice.len()
Example
use faer_core::{mat, MatMut};

let mut slice = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0_f64];
let view = MatMut::<f64>::from_row_major_slice(&mut slice, 3, 2);

let expected = mat![[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]];
assert_eq!(expected, view);
source

pub unsafe fn from_raw_parts( ptr: GroupFor<E, *mut E::Unit>, nrows: usize, ncols: usize, row_stride: isize, col_stride: isize ) -> Self

Creates a MatMut from pointers to the matrix data, dimensions, and strides.

The row (resp. column) stride is the offset from the memory address of a given matrix element at indices (row: i, col: j), to the memory address of the matrix element at indices (row: i + 1, col: 0) (resp. (row: 0, col: i + 1)). This offset is specified in number of elements, not in bytes.

Safety

The behavior is undefined if any of the following conditions are violated:

  • For each matrix unit, the entire memory region addressed by the matrix must be contained within a single allocation, accessible in its entirety by the corresponding pointer in ptr.
  • For each matrix unit, the corresponding pointer must be properly aligned, even for a zero-sized matrix.
  • The values accessible by the matrix must be initialized at some point before they are read, or references to them are formed.
  • No aliasing (including self aliasing) is allowed. In other words, none of the elements accessible by any matrix unit may be accessed for reads or writes by any other means for the duration of the lifetime 'a. No two elements within a single matrix unit may point to the same address (such a thing can be achieved with a zero stride, for example), and no two matrix units may point to the same address.
Example
use faer_core::{mat, MatMut};

// row major matrix with 2 rows, 3 columns, with a column at the end that we want to skip.
// the row stride is the pointer offset from the address of 1.0 to the address of 4.0,
// which is 4.
// the column stride is the pointer offset from the address of 1.0 to the address of 2.0,
// which is 1.
let mut data = [[1.0, 2.0, 3.0, f64::NAN], [4.0, 5.0, 6.0, f64::NAN]];
let mut matrix =
    unsafe { MatMut::<f64>::from_raw_parts(data.as_mut_ptr() as *mut f64, 2, 3, 4, 1) };

let expected = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
assert_eq!(expected.as_ref(), matrix);
source

pub fn as_ptr(self) -> GroupFor<E, *mut E::Unit>

Returns pointers to the matrix data.

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_stride(&self) -> isize

Returns the row stride of the matrix, specified in number of elements, not in bytes.

source

pub fn col_stride(&self) -> isize

Returns the column stride of the matrix, specified in number of elements, not in bytes.

source

pub fn ptr_at(self, row: usize, col: usize) -> GroupFor<E, *mut E::Unit>

Returns raw pointers to the element at the given indices.

source

pub unsafe fn ptr_inbounds_at( self, row: usize, col: usize ) -> GroupFor<E, *mut E::Unit>

Returns raw pointers to the element at the given indices, assuming the provided indices are within the matrix dimensions.

Safety

The behavior is undefined if any of the following conditions are violated:

  • row < self.nrows().
  • col < self.ncols().
source

pub fn split_at(self, row: usize, col: usize) -> [Self; 4]

Splits the matrix horizontally and vertically at the given indices into four corners and returns an array of each submatrix, in the following order:

  • top left.
  • top right.
  • bottom left.
  • bottom right.
Panics

The function panics if any of the following conditions are violated:

  • row <= self.nrows().
  • col <= self.ncols().
source

pub fn split_at_row(self, row: usize) -> [Self; 2]

Splits the matrix horizontally at the given row into two parts and returns an array of each submatrix, in the following order:

  • top.
  • bottom.
source

pub fn split_at_col(self, col: usize) -> [Self; 2]

Splits the matrix vertically at the given row into two parts and returns an array of each submatrix, in the following order:

  • left.
  • right.
source

pub unsafe fn get_unchecked<RowRange, ColRange>( self, row: RowRange, col: ColRange ) -> <Self as MatIndex<RowRange, ColRange>>::Target
where Self: MatIndex<RowRange, ColRange>,

Returns mutable references to the element at the given indices, or submatrices if either row or col is a range.

Note

The values pointed to by the references are expected to be initialized, even if the pointed-to value is not read, otherwise the behavior is undefined.

Safety

The behavior is undefined if any of the following conditions are violated:

  • row must be contained in [0, self.nrows()).
  • col must be contained in [0, self.ncols()).
source

pub fn get<RowRange, ColRange>( self, row: RowRange, col: ColRange ) -> <Self as MatIndex<RowRange, ColRange>>::Target
where Self: MatIndex<RowRange, ColRange>,

Returns mutable references to the element at the given indices, or submatrices if either row or col is a range, with bound checks.

Note

The values pointed to by the references are expected to be initialized, even if the pointed-to value is not read, otherwise the behavior is undefined.

Panics

The function panics if any of the following conditions are violated:

  • row must be contained in [0, self.nrows()).
  • col must be contained in [0, self.ncols()).
source

pub unsafe fn read_unchecked(&self, row: usize, col: usize) -> E

Reads the value of the element at the given indices.

Safety

The behavior is undefined if any of the following conditions are violated:

  • row < self.nrows().
  • col < self.ncols().
source

pub fn read(&self, row: usize, col: usize) -> E

Reads the value of the element at the given indices, with bound checks.

Panics

The function panics if any of the following conditions are violated:

  • row < self.nrows().
  • col < self.ncols().
source

pub unsafe fn write_unchecked(&mut self, row: usize, col: usize, value: E)

Writes the value to the element at the given indices.

Safety

The behavior is undefined if any of the following conditions are violated:

  • row < self.nrows().
  • col < self.ncols().
source

pub fn write(&mut self, row: usize, col: usize, value: E)

Writes the value to the element at the given indices, with bound checks.

Panics

The function panics if any of the following conditions are violated:

  • row < self.nrows().
  • col < self.ncols().
source

pub fn clone_from(&mut self, other: impl AsMatRef<E>)

Copies the values from other into self.

Panics

The function panics if any of the following conditions are violated:

  • self.nrows() == other.nrows().
  • self.ncols() == other.ncols().
source

pub fn fill_zeros(&mut self)
where E: ComplexField,

Fills the elements of self with zeros.

source

pub fn fill(&mut self, constant: E)

Fills the elements of self with copies of constant.

source

pub fn transpose(self) -> Self

Returns a view over the transpose of self.

Example
use faer_core::mat;

let mut matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_mut();
let transpose = view.transpose();

let mut expected = mat![[1.0, 4.0], [2.0, 5.0], [3.0, 6.0]];
assert_eq!(expected.as_mut(), transpose);
source

pub fn conjugate(self) -> MatMut<'a, E::Conj>
where E: Conjugate,

Returns a view over the conjugate of self.

source

pub fn adjoint(self) -> MatMut<'a, E::Conj>
where E: Conjugate,

Returns a view over the conjugate transpose of self.

source

pub fn canonicalize(self) -> (MatMut<'a, E::Canonical>, Conj)
where E: Conjugate,

Returns a view over the canonical representation of self, as well as a flag declaring whether self is implicitly conjugated or not.

source

pub fn reverse_rows(self) -> Self

Returns a view over the self, with the rows in reversed order.

Example
use faer_core::mat;

let mut matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_mut();
let reversed_rows = view.reverse_rows();

let mut expected = mat![[4.0, 5.0, 6.0], [1.0, 2.0, 3.0]];
assert_eq!(expected.as_mut(), reversed_rows);
source

pub fn reverse_cols(self) -> Self

Returns a view over the self, with the columns in reversed order.

Example
use faer_core::mat;

let mut matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_mut();
let reversed_cols = view.reverse_cols();

let mut expected = mat![[3.0, 2.0, 1.0], [6.0, 5.0, 4.0]];
assert_eq!(expected.as_mut(), reversed_cols);
source

pub fn reverse_rows_and_cols(self) -> Self

Returns a view over the self, with the rows and the columns in reversed order.

Example
use faer_core::mat;

let mut matrix = mat![[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]];
let view = matrix.as_mut();
let reversed = view.reverse_rows_and_cols();

let mut expected = mat![[6.0, 5.0, 4.0], [3.0, 2.0, 1.0]];
assert_eq!(expected.as_mut(), reversed);
source

pub fn submatrix( self, row_start: usize, col_start: usize, nrows: usize, ncols: usize ) -> Self

Returns a view over the submatrix starting at indices (row_start, col_start), and with dimensions (nrows, ncols).

Panics

The function panics if any of the following conditions are violated:

  • row_start <= self.nrows().
  • col_start <= self.ncols().
  • nrows <= self.nrows() - row_start.
  • ncols <= self.ncols() - col_start.
Example
use faer_core::mat;

let mut matrix = mat![
    [1.0, 5.0, 9.0],
    [2.0, 6.0, 10.0],
    [3.0, 7.0, 11.0],
    [4.0, 8.0, 12.0f64],
];

let view = matrix.as_mut();
let submatrix = view.submatrix(2, 1, 2, 2);

let mut expected = mat![[7.0, 11.0], [8.0, 12.0f64]];
assert_eq!(expected.as_mut(), submatrix);
source

pub fn subrows(self, row_start: usize, nrows: usize) -> Self

Returns a view over the submatrix starting at row row_start, and with number of rows nrows.

Panics

The function panics if any of the following conditions are violated:

  • row_start <= self.nrows().
  • nrows <= self.nrows() - row_start.
Example
use faer_core::mat;

let mut matrix = mat![
    [1.0, 5.0, 9.0],
    [2.0, 6.0, 10.0],
    [3.0, 7.0, 11.0],
    [4.0, 8.0, 12.0f64],
];

let view = matrix.as_mut();
let subrows = view.subrows(1, 2);

let mut expected = mat![[2.0, 6.0, 10.0], [3.0, 7.0, 11.0],];
assert_eq!(expected.as_mut(), subrows);
source

pub fn subcols(self, col_start: usize, ncols: usize) -> Self

Returns a view over the submatrix starting at column col_start, and with number of columns ncols.

Panics

The function panics if any of the following conditions are violated:

  • col_start <= self.ncols().
  • ncols <= self.ncols() - col_start.
Example
use faer_core::mat;

let mut matrix = mat![
    [1.0, 5.0, 9.0],
    [2.0, 6.0, 10.0],
    [3.0, 7.0, 11.0],
    [4.0, 8.0, 12.0f64],
];

let view = matrix.as_mut();
let subcols = view.subcols(2, 1);

let mut expected = mat![[9.0], [10.0], [11.0], [12.0f64]];
assert_eq!(expected.as_mut(), subcols);
source

pub fn row(self, row_idx: usize) -> Self

Returns a view over the row at the given index.

Panics

The function panics if any of the following conditions are violated:

  • row_idx < self.nrows().
source

pub fn col(self, col_idx: usize) -> Self

Returns a view over the column at the given index.

Panics

The function panics if any of the following conditions are violated:

  • col_idx < self.ncols().
source

pub fn diagonal(self) -> Self

Returns a view over the main diagonal of the matrix.

Example
use faer_core::mat;

let mut matrix = mat![
    [1.0, 5.0, 9.0],
    [2.0, 6.0, 10.0],
    [3.0, 7.0, 11.0],
    [4.0, 8.0, 12.0f64],
];

let view = matrix.as_mut();
let diagonal = view.diagonal();

let mut expected = mat![[1.0], [6.0], [11.0]];
assert_eq!(expected.as_mut(), diagonal);
source

pub fn to_owned(&self) -> Mat<E::Canonical>
where E: Conjugate,

Returns an owning Mat of the data

source

pub fn has_nan(&self) -> bool
where E: ComplexField,

Returns true if any of the elements is NaN, otherwise returns false.

source

pub fn is_all_finite(&self) -> bool
where E: ComplexField,

Returns true if all of the elements are finite, otherwise returns false.

source

pub fn cwise(self) -> Zip<(Self,)>

Returns a thin wrapper that can be used to execute coefficient-wise operations on matrices.

source

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

Returns a view over the matrix.

source

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

Returns a mutable view over the matrix.

source

pub fn into_col_chunks( self, chunk_size: usize ) -> impl 'a + DoubleEndedIterator<Item = MatMut<'a, E>>

Returns an iterator that provides successive chunks of the columns of this matrix, with each having at most chunk_size columns.

If the number of columns is a multiple of chunk_size, then all chunks have chunk_size columns.

source

pub fn into_row_chunks( self, chunk_size: usize ) -> impl 'a + DoubleEndedIterator<Item = MatMut<'a, E>>

Returns an iterator that provides successive chunks of the rows of this matrix, with each having at most chunk_size rows.

If the number of rows is a multiple of chunk_size, then all chunks have chunk_size rows.

source

pub fn into_par_col_chunks( self, chunk_size: usize ) -> impl 'a + IndexedParallelIterator<Item = MatMut<'a, E>>

Returns a parallel iterator that provides successive chunks of the columns of this matrix, with each having at most chunk_size columns.

If the number of columns is a multiple of chunk_size, then all chunks have chunk_size columns.

Only available with the rayon feature.

source

pub fn into_par_row_chunks( self, chunk_size: usize ) -> impl 'a + IndexedParallelIterator<Item = MatMut<'a, E>>

Returns a parallel iterator that provides successive chunks of the rows of this matrix, with each having at most chunk_size rows.

If the number of rows is a multiple of chunk_size, then all chunks have chunk_size rows.

Only available with the rayon feature.

source§

impl<'a, E: RealField> MatMut<'a, Complex<E>>

source

pub fn real_imag(self) -> Complex<MatMut<'a, E>>

Trait Implementations§

source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Add<MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the + operator.
source§

fn add(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the + operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<&Mat<RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: &Mat<RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<&MatMut<'_, RhsE>> for Mat<LhsE>

source§

fn add_assign(&mut self, rhs: &MatMut<'_, RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: &MatMut<'_, RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: &MatRef<'_, RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<Mat<RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: Mat<RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<MatMut<'_, RhsE>> for Mat<LhsE>

source§

fn add_assign(&mut self, rhs: MatMut<'_, RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<MatMut<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: MatMut<'_, RhsE>)

Performs the += operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> AddAssign<MatRef<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn add_assign(&mut self, rhs: MatRef<'_, RhsE>)

Performs the += operation. Read more
source§

impl<E: Entity> AsMatMut<E> for &mut MatMut<'_, E>

source§

fn as_mat_mut(&mut self) -> MatMut<'_, E>

source§

impl<E: Entity> AsMatMut<E> for MatMut<'_, E>

source§

fn as_mat_mut(&mut self) -> MatMut<'_, E>

source§

impl<E: Entity> AsMatRef<E> for &MatMut<'_, E>

source§

fn as_mat_ref(&self) -> MatRef<'_, E>

source§

impl<E: Entity> AsMatRef<E> for MatMut<'_, E>

source§

fn as_mat_ref(&self) -> MatRef<'_, E>

source§

impl<'a, FromE: Entity, ToE: Entity> Coerce<MatMut<'a, ToE>> for MatMut<'a, FromE>

source§

fn coerce(self) -> MatMut<'a, ToE>

source§

impl<'a, E: Entity> Debug for MatMut<'a, E>

source§

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

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

impl<E: Entity> DenseAccess<E> for MatMut<'_, E>

source§

fn fetch_single(&self, row: usize, col: usize) -> E

source§

impl<E: SimpleEntity> Index<(usize, usize)> for MatMut<'_, E>

§

type Output = E

The returned type after indexing.
source§

fn index(&self, (row, col): (usize, usize)) -> &E

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

impl<E: SimpleEntity> IndexMut<(usize, usize)> for MatMut<'_, E>

source§

fn index_mut(&mut self, (row, col): (usize, usize)) -> &mut E

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

impl<'a, E: Entity> IntoConst for MatMut<'a, E>

§

type Target = MatRef<'a, E>

source§

fn into_const(self) -> Self::Target

source§

impl<'a, 'short, E: Entity> Mat<'short> for MatMut<'a, E>

§

type Item = ReadWrite<'short, E>

§

type RawSlice = <<E as Entity>::Group as ForType>::FaerOf<&'a mut [MaybeUninit<<E as Entity>::Unit>]>

source§

fn transpose(self) -> Self

source§

fn reverse_rows(self) -> Self

source§

fn reverse_cols(self) -> Self

source§

fn nrows(&self) -> usize

source§

fn ncols(&self) -> usize

source§

fn row_stride(&self) -> isize

source§

fn col_stride(&self) -> isize

source§

unsafe fn get(&mut self, i: usize, j: usize) -> Self::Item

Safety Read more
source§

unsafe fn get_column_slice( &mut self, i: usize, j: usize, n_elems: usize ) -> Self::RawSlice

Safety Read more
source§

impl<E: Entity> MatIndex<Range<usize>, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: Range<usize>, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<Range<usize>, usize> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: Range<usize>, col: usize) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeFull, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeFull, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeFull, usize> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeFull, col: usize) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeInclusive<usize>, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeInclusive<usize>, usize> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeInclusive<usize>, col: usize) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeTo<usize>, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeTo<usize>, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeTo<usize>, usize> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeTo<usize>, col: usize) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeToInclusive<usize>, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<RangeToInclusive<usize>, usize> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: RangeToInclusive<usize>, col: usize) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeFull> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

§

type Target = <MatMut<'_, E> as MatIndex<RowRange, Range<usize>>>::Target

source§

fn get( this: Self, row: RowRange, col: RangeFull ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeInclusive<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

§

type Target = <MatMut<'_, E> as MatIndex<RowRange, Range<usize>>>::Target

source§

fn get( this: Self, row: RowRange, col: RangeInclusive<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeTo<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

§

type Target = <MatMut<'_, E> as MatIndex<RowRange, Range<usize>>>::Target

source§

fn get( this: Self, row: RowRange, col: RangeTo<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity, RowRange> MatIndex<RowRange, RangeToInclusive<usize>> for MatMut<'_, E>
where Self: MatIndex<RowRange, Range<usize>>,

§

type Target = <MatMut<'_, E> as MatIndex<RowRange, Range<usize>>>::Target

source§

fn get( this: Self, row: RowRange, col: RangeToInclusive<usize> ) -> <Self as MatIndex<RowRange, Range<usize>>>::Target

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<E: Entity> MatIndex<usize, Range<usize>> for MatMut<'_, E>

§

type Target = MatMut<'_, E>

source§

fn get(this: Self, row: usize, col: Range<usize>) -> Self

source§

unsafe fn get_unchecked( this: Self, row: RowRange, col: ColRange ) -> Self::Target

source§

impl<'a, E: Entity> MatIndex<usize, usize> for MatMut<'a, E>

§

type Target = <<E as Entity>::Group as ForType>::FaerOf<&'a mut <E as Entity>::Unit>

source§

unsafe fn get_unchecked(this: Self, row: usize, col: usize) -> Self::Target

source§

fn get(this: Self, row: usize, col: usize) -> Self::Target

source§

impl<E: Entity> Matrix<E> for MatMut<'_, E>

source§

fn rows(&self) -> usize

source§

fn cols(&self) -> usize

source§

fn access(&self) -> Access<'_, E>

Expose dense or sparse access to the matrix.
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<E: ComplexField, MatE: Conjugate<Canonical = E>> Mul<&MatMut<'_, MatE>> for Scale<E>

§

type Output = Mat<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, MatE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<E: ComplexField, MatE: Conjugate<Canonical = E>> Mul<MatMut<'_, MatE>> for Scale<E>

§

type Output = Mat<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, MatE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: ComplexField, MatE: Conjugate<Canonical = E>> Mul<Scale<E>> for &MatMut<'_, MatE>

§

type Output = Mat<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scale<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: ComplexField, MatE: Conjugate<Canonical = E>> Mul<Scale<E>> for MatMut<'_, MatE>

§

type Output = Mat<E>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Scale<E>) -> Self::Output

Performs the * operation. Read more
source§

impl<E: ComplexField> MulAssign<Scale<E>> for MatMut<'_, E>

source§

fn mul_assign(&mut self, rhs: Scale<E>)

Performs the *= operation. Read more
source§

impl<E: Conjugate> Neg for &MatMut<'_, E>

§

type Output = Mat<<E as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<E: Conjugate> Neg for MatMut<'_, E>

§

type Output = Mat<<E as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<&Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &&Mat<RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<&MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &&MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &&MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<&MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &&MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &&MatRef<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &Mat<RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &Mat<RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatMut<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatRef<'_, RhsE>) -> 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<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> PartialEq<MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

source§

fn eq(&self, rhs: &MatRef<'_, RhsE>) -> 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<'short, 'a, E: Entity> Reborrow<'short> for MatMut<'a, E>

§

type Target = MatRef<'short, E>

source§

fn rb(&'short self) -> Self::Target

source§

impl<'short, 'a, E: Entity> ReborrowMut<'short> for MatMut<'a, E>

§

type Target = MatMut<'short, E>

source§

fn rb_mut(&'short mut self) -> Self::Target

source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: &MatRef<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<Mat<RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<Mat<RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for &Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for &MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for Mat<LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatMut<'_, RhsE>> for MatRef<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatMut<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatRef<'_, RhsE>> for &MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Sub<MatRef<'_, RhsE>> for MatMut<'_, LhsE>
where LhsE::Canonical: ComplexField,

§

type Output = Mat<<LhsE as Conjugate>::Canonical>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: MatRef<'_, RhsE>) -> Self::Output

Performs the - operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<&Mat<RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: &Mat<RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<&MatMut<'_, RhsE>> for Mat<LhsE>

source§

fn sub_assign(&mut self, rhs: &MatMut<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<&MatMut<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: &MatMut<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<&MatRef<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: &MatRef<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<Mat<RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: Mat<RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<MatMut<'_, RhsE>> for Mat<LhsE>

source§

fn sub_assign(&mut self, rhs: MatMut<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<MatMut<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: MatMut<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<LhsE: ComplexField, RhsE: Conjugate<Canonical = LhsE>> SubAssign<MatRef<'_, RhsE>> for MatMut<'_, LhsE>

source§

fn sub_assign(&mut self, rhs: MatRef<'_, RhsE>)

Performs the -= operation. Read more
source§

impl<E: Entity> Send for MatMut<'_, E>

source§

impl<E: Entity> Sync for MatMut<'_, E>

Auto Trait Implementations§

§

impl<'a, E> RefUnwindSafe for MatMut<'a, E>

§

impl<'a, E> Unpin for MatMut<'a, E>
where <<E as Entity>::Group as ForCopyType>::FaerOfCopy<*mut <E as Entity>::Unit>: Unpin,

§

impl<'a, E> !UnwindSafe for MatMut<'a, E>

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> 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

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

§

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>,

§

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.