[][src]Struct totsu::matgen::MatGen

pub struct MatGen<V: MatView> { /* fields omitted */ }

Generic struct of matrix

Methods

impl<V: MatView> MatGen<V>[src]

pub fn new(nrows: usize, ncols: usize) -> MatGen<V::OwnColl>[src]

new - Makes a matrix.

pub fn new_like<V2: MatView>(mat: &MatGen<V2>) -> MatGen<V::OwnColl>[src]

new - Makes a matrix of the same size.

pub fn new_vec(nrows: usize) -> MatGen<V::OwnColl>[src]

new - Makes a column vector.

pub fn slice<'a, RR, CR>(&'a self, rows: RR, cols: CR) -> MatGen<&V::OwnColl> where
    RR: RangeBounds<usize>,
    CR: RangeBounds<usize>,
    &'a V::OwnColl: MatView
[src]

slice - Slice block reference.

pub fn slice_mut<'a, RR, CR>(
    &'a mut self,
    rows: RR,
    cols: CR
) -> MatGen<&mut V::OwnColl> where
    RR: RangeBounds<usize>,
    CR: RangeBounds<usize>,
    &'a mut V::OwnColl: MatView
[src]

slice - Slice block mutable reference.

pub fn rows<'a, RR>(&'a self, rows: RR) -> MatGen<&V::OwnColl> where
    RR: RangeBounds<usize>,
    &'a V::OwnColl: MatView
[src]

slice - Row vectors reference.

pub fn cols<'a, CR>(&'a self, cols: CR) -> MatGen<&V::OwnColl> where
    CR: RangeBounds<usize>,
    &'a V::OwnColl: MatView
[src]

slice - Column vectors reference.

pub fn row<'a>(&'a self, r: usize) -> MatGen<&V::OwnColl> where
    &'a V::OwnColl: MatView
[src]

slice - A row vector reference.

pub fn col<'a>(&'a self, c: usize) -> MatGen<&V::OwnColl> where
    &'a V::OwnColl: MatView
[src]

slice - A column vector reference.

pub fn rows_mut<'a, RR>(&'a mut self, rows: RR) -> MatGen<&mut V::OwnColl> where
    RR: RangeBounds<usize>,
    &'a mut V::OwnColl: MatView
[src]

slice - Row vectors mutable reference.

pub fn cols_mut<'a, CR>(&'a mut self, cols: CR) -> MatGen<&mut V::OwnColl> where
    CR: RangeBounds<usize>,
    &'a mut V::OwnColl: MatView
[src]

slice - Column vectors mutable reference.

pub fn row_mut<'a>(&'a mut self, r: usize) -> MatGen<&mut V::OwnColl> where
    &'a mut V::OwnColl: MatView
[src]

slice - A row vector mutable reference.

pub fn col_mut<'a>(&'a mut self, c: usize) -> MatGen<&mut V::OwnColl> where
    &'a mut V::OwnColl: MatView
[src]

slice - A column vector mutable reference.

pub fn as_slice<'a>(&'a self) -> MatGen<&V::OwnColl> where
    &'a V::OwnColl: MatView
[src]

slice - Whole reference.

pub fn as_slice_mut<'a>(&'a mut self) -> MatGen<&mut V::OwnColl> where
    &'a mut V::OwnColl: MatView
[src]

slice - Whole mutable reference.

pub fn t<'a>(&'a self) -> MatGen<&V::OwnColl> where
    &'a V::OwnColl: MatView
[src]

slice - Transopsed reference.

pub fn t_mut<'a>(&'a mut self) -> MatGen<&mut V::OwnColl> where
    &'a mut V::OwnColl: MatView
[src]

slice - Transopsed mutable reference.

pub fn set_by<F>(self, f: F) -> MatGen<V> where
    F: FnMut(usize, usize) -> FP
[src]

set - Set by closure.

pub fn set_iter<'b, T>(self, iter: T) -> MatGen<V> where
    T: IntoIterator<Item = &'b FP>, 
[src]

set - Set by iterator.

pub fn set_eye(self, value: FP) -> MatGen<V>[src]

set - Set eye matrix with a value.

pub fn set_all(self, value: FP) -> MatGen<V>[src]

set - Set a value.

pub fn set_t(self) -> MatGen<V>[src]

set - Set transposed.

pub fn clone_sz(&self) -> MatGen<V::OwnColl>[src]

clone - Clone with shrinking size.

pub fn clone_diag(&self) -> MatGen<V::OwnColl>[src]

clone - Clone into diagonal matrix.

pub fn a(&mut self, index: (usize, usize), val: FP)[src]

assign - Assign by index

pub fn assign_by<F>(&mut self, f: F) where
    F: FnMut(usize, usize) -> Option<FP>, 
[src]

assign - Assign by closure.

pub fn assign_iter<'b, T>(&mut self, iter: T) where
    T: IntoIterator<Item = &'b FP>, 
[src]

assign - Assign by iterator.

pub fn assign_eye(&mut self, value: FP)[src]

assign - Assign eye matrix with a value.

pub fn assign_all(&mut self, value: FP)[src]

assign - Assign a value.

pub fn assign_s<V2: MatView>(&mut self, rhs: &MatGen<V2>, value: FP)[src]

assign - Assign matrix with scaling.

pub fn assign<V2: MatView>(&mut self, rhs: &MatGen<V2>)[src]

assign - Assign matrix.

pub fn norm_p2sq(&self) -> FP[src]

Returns p=2 norm squared.

pub fn norm_p2(&self) -> FP[src]

Returns p=2 norm.

pub fn tr(&self) -> FP[src]

Returns trace.

pub fn prod<V2: MatView>(&self, rhs: &MatGen<V2>) -> FP[src]

Returns inner product.

pub fn max(&self) -> Option<FP>[src]

Finds maximum value.

pub fn min(&self) -> Option<FP>[src]

Finds minumum value.

pub fn size(&self) -> (usize, usize)[src]

Returns number of rows and columns.

pub fn diag_mul<'a, V2: MatView>(
    &self,
    rhs: &'a MatGen<V2>
) -> MatGen<V::OwnColl> where
    &'a V2::OwnColl: MatView
[src]

Made into diagonal matrix and multiplied.

pub fn transform<'a, V2: MatView>(
    &self,
    rhs: &'a MatGen<V2>
) -> MatGen<V2::OwnColl>
[src]

Linear transform by matrix multiplication.

Trait Implementations

impl<V: MatView> MatAcc for MatGen<V>[src]

impl<V: MatView, '_> MatAcc for &'_ MatGen<V>[src]

impl<V: MatView, V2: MatView> PartialEq<MatGen<V2>> for MatGen<V>[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl<V: MatView> Display for MatGen<V>[src]

impl<V: MatView> LowerExp for MatGen<V>[src]

impl<V: Debug + MatView> Debug for MatGen<V>[src]

impl<V: MatView, T: MatAcc> Add<T> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView, T: MatAcc, '_> Add<T> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView> Add<f64> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView, '_> Add<f64> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView> Add<MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView, '_> Add<&'_ MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the + operator.

impl<V: MatView, T: MatAcc> Sub<T> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, T: MatAcc, '_> Sub<T> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView> Sub<f64> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, '_> Sub<f64> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView> Sub<MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, '_> Sub<&'_ MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, T: MatAcc> Mul<T> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView, T: MatAcc, '_> Mul<T> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView> Mul<f64> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView, '_> Mul<f64> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView> Mul<MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView, '_> Mul<&'_ MatGen<V>> for FP[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the * operator.

impl<V: MatView> Div<f64> for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the / operator.

impl<V: MatView, '_> Div<f64> for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the / operator.

impl<V: MatView> Neg for MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, '_> Neg for &'_ MatGen<V>[src]

type Output = MatGen<V::OwnColl>

The resulting type after applying the - operator.

impl<V: MatView, T: MatAcc> AddAssign<T> for MatGen<V>[src]

impl<V: MatView> AddAssign<f64> for MatGen<V>[src]

impl<V: MatView, T: MatAcc> SubAssign<T> for MatGen<V>[src]

impl<V: MatView> SubAssign<f64> for MatGen<V>[src]

impl<V: MatView> MulAssign<f64> for MatGen<V>[src]

impl<V: MatView> DivAssign<f64> for MatGen<V>[src]

impl<V: MatView> Index<(usize, usize)> for MatGen<V>[src]

type Output = FP

The returned type after indexing.

impl<V: MatView> IndexMut<(usize, usize)> for MatGen<V>[src]

Auto Trait Implementations

impl<V> Send for MatGen<V> where
    V: Send

impl<V> Sync for MatGen<V> where
    V: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]