Struct faer_core::MatRef

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

Implementations§

source§

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

source

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

source

pub fn as_ptr(self) -> E::Group<*const E::Unit>

source

pub fn nrows(&self) -> usize

source

pub fn ncols(&self) -> usize

source

pub fn row_stride(&self) -> isize

source

pub fn col_stride(&self) -> isize

source

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

source

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

source

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

source

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

source

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

source

pub unsafe fn get_unchecked( self, row: usize, col: usize ) -> E::Group<&'a E::Unit>

source

pub fn get(self, row: usize, col: usize) -> E::Group<&'a E::Unit>

source

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

source

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

source

pub fn transpose(self) -> Self

source

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

source

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

source

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

source

pub fn reverse_rows(self) -> Self

source

pub fn reverse_cols(self) -> Self

source

pub fn reverse_rows_and_cols(self) -> Self

source

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

source

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

source

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

source

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

source

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

source

pub fn diagonal(self) -> Self

source

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

Returns an owning Mat of the data

source

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

Returns a thin wrapper that can be used to execute coefficientwise operations on matrices.

source§

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

source

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

Trait Implementations§

source§

impl<E: Entity> Clone for MatRef<'_, E>

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<'a, FromE: Entity, ToE: Entity> Coerce<MatRef<'a, ToE>> for MatRef<'a, FromE>

source§

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

source§

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

source§

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

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

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

§

type Item = Read<'short, E>

§

type RawSlice = <E as Entity>::Group<&'a [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

source§

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

source§

unsafe fn get_slice_elem(slice: &mut Self::RawSlice, idx: usize) -> Self::Item

source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<Mat<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: Mat<RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatRef<'_, 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: MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<LhsE: Conjugate, RhsE: Conjugate<Canonical = LhsE::Canonical>> Mul<MatRef<'_, 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: MatRef<'_, RhsE>) -> Self::Output

Performs the * operation. Read more
source§

impl<'a, U: Conjugate, T: Conjugate<Canonical = U::Canonical>> PartialEq<MatRef<'a, U>> for MatRef<'a, T>where T::Canonical: ComplexField,

source§

fn eq(&self, other: &MatRef<'a, 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<E: Entity> Copy for MatRef<'_, E>

source§

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

source§

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

Auto Trait Implementations§

§

impl<'a, E> RefUnwindSafe for MatRef<'a, E>where E: RefUnwindSafe, <E as Entity>::GroupCopy<NonNull<<E as Entity>::Unit>>: RefUnwindSafe,

§

impl<'a, E> Unpin for MatRef<'a, E>where <E as Entity>::GroupCopy<NonNull<<E as Entity>::Unit>>: Unpin,

§

impl<'a, E> UnwindSafe for MatRef<'a, E>where E: RefUnwindSafe, <E as Entity>::GroupCopy<NonNull<<E as Entity>::Unit>>: UnwindSafe,

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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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 = 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.
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.
source§

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

Performs the conversion.