[−][src]Struct totsu::matgen::MatGen
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]
RR: RangeBounds<usize>,
CR: RangeBounds<usize>,
&'a V::OwnColl: MatView,
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]
&'a mut self,
rows: RR,
cols: CR
) -> MatGen<&mut V::OwnColl> where
RR: RangeBounds<usize>,
CR: RangeBounds<usize>,
&'a mut V::OwnColl: MatView,
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]
RR: RangeBounds<usize>,
&'a V::OwnColl: MatView,
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]
CR: RangeBounds<usize>,
&'a V::OwnColl: MatView,
slice - Column vectors reference.
pub fn row<'a>(&'a self, r: usize) -> MatGen<&V::OwnColl> where
&'a V::OwnColl: MatView,
[src]
&'a V::OwnColl: MatView,
slice - A row vector reference.
pub fn col<'a>(&'a self, c: usize) -> MatGen<&V::OwnColl> where
&'a V::OwnColl: MatView,
[src]
&'a V::OwnColl: MatView,
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]
RR: RangeBounds<usize>,
&'a mut V::OwnColl: MatView,
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]
CR: RangeBounds<usize>,
&'a mut V::OwnColl: MatView,
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]
&'a mut V::OwnColl: MatView,
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]
&'a mut V::OwnColl: MatView,
slice - A column vector mutable reference.
pub fn as_slice<'a>(&'a self) -> MatGen<&V::OwnColl> where
&'a V::OwnColl: MatView,
[src]
&'a V::OwnColl: MatView,
slice - Whole reference.
pub fn as_slice_mut<'a>(&'a mut self) -> MatGen<&mut V::OwnColl> where
&'a mut V::OwnColl: MatView,
[src]
&'a mut V::OwnColl: MatView,
slice - Whole mutable reference.
pub fn t<'a>(&'a self) -> MatGen<&V::OwnColl> where
&'a V::OwnColl: MatView,
[src]
&'a V::OwnColl: MatView,
slice - Transopsed reference.
pub fn t_mut<'a>(&'a mut self) -> MatGen<&mut V::OwnColl> where
&'a mut V::OwnColl: MatView,
[src]
&'a mut V::OwnColl: MatView,
slice - Transopsed mutable reference.
pub fn set_by<F>(self, f: F) -> MatGen<V> where
F: FnMut(usize, usize) -> FP,
[src]
F: FnMut(usize, usize) -> FP,
set - Set by closure.
pub fn set_iter<'b, T>(self, iter: T) -> MatGen<V> where
T: IntoIterator<Item = &'b FP>,
[src]
T: IntoIterator<Item = &'b FP>,
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]
F: FnMut(usize, usize) -> Option<FP>,
assign - Assign by closure.
pub fn assign_iter<'b, T>(&mut self, iter: T) where
T: IntoIterator<Item = &'b FP>,
[src]
T: IntoIterator<Item = &'b FP>,
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]
&self,
rhs: &'a MatGen<V2>
) -> MatGen<V::OwnColl> where
&'a V2::OwnColl: MatView,
Made into diagonal matrix and multiplied.
pub fn transform<'a, V2: MatView>(
&self,
rhs: &'a MatGen<V2>
) -> MatGen<V2::OwnColl>
[src]
&self,
rhs: &'a MatGen<V2>
) -> MatGen<V2::OwnColl>
Linear transform by matrix multiplication.
Trait Implementations
impl<V: MatView> MatAcc for MatGen<V>
[src]
fn acc_size(&self) -> (usize, usize)
[src]
fn acc_get(&self, row: usize, col: usize) -> FP
[src]
fn acc_is_less(&self, sz: (usize, usize)) -> bool
[src]
ⓘImportant traits for MatIter<'a>fn acc_iter(&self) -> MatIter
[src]
impl<V: MatView, '_> MatAcc for &'_ MatGen<V>
[src]
fn acc_size(&self) -> (usize, usize)
[src]
fn acc_get(&self, row: usize, col: usize) -> FP
[src]
fn acc_is_less(&self, sz: (usize, usize)) -> bool
[src]
ⓘImportant traits for MatIter<'a>fn acc_iter(&self) -> MatIter
[src]
impl<V: MatView, V2: MatView> PartialEq<MatGen<V2>> for MatGen<V>
[src]
fn eq(&self, other: &MatGen<V2>) -> bool
[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.
fn add(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc, '_> Add<T> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the +
operator.
fn add(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Add<f64> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the +
operator.
fn add(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Add<f64> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the +
operator.
fn add(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Add<MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the +
operator.
fn add(self, rhs: MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Add<&'_ MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the +
operator.
fn add(self, rhs: &MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc> Sub<T> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc, '_> Sub<T> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Sub<f64> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Sub<f64> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Sub<MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Sub<&'_ MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn sub(self, rhs: &MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc> Mul<T> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc, '_> Mul<T> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Mul<f64> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Mul<f64> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Mul<MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Mul<&'_ MatGen<V>> for FP
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the *
operator.
fn mul(self, rhs: &MatGen<V>) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Div<f64> for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the /
operator.
fn div(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Div<f64> for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the /
operator.
fn div(self, rhs: FP) -> MatGen<V::OwnColl>
[src]
impl<V: MatView> Neg for MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn neg(self) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, '_> Neg for &'_ MatGen<V>
[src]
type Output = MatGen<V::OwnColl>
The resulting type after applying the -
operator.
fn neg(self) -> MatGen<V::OwnColl>
[src]
impl<V: MatView, T: MatAcc> AddAssign<T> for MatGen<V>
[src]
fn add_assign(&mut self, rhs: T)
[src]
impl<V: MatView> AddAssign<f64> for MatGen<V>
[src]
fn add_assign(&mut self, rhs: FP)
[src]
impl<V: MatView, T: MatAcc> SubAssign<T> for MatGen<V>
[src]
fn sub_assign(&mut self, rhs: T)
[src]
impl<V: MatView> SubAssign<f64> for MatGen<V>
[src]
fn sub_assign(&mut self, rhs: FP)
[src]
impl<V: MatView> MulAssign<f64> for MatGen<V>
[src]
fn mul_assign(&mut self, rhs: FP)
[src]
impl<V: MatView> DivAssign<f64> for MatGen<V>
[src]
fn div_assign(&mut self, rhs: FP)
[src]
impl<V: MatView> Index<(usize, usize)> for MatGen<V>
[src]
type Output = FP
The returned type after indexing.
fn index(&self, index: (usize, usize)) -> &FP
[src]
impl<V: MatView> IndexMut<(usize, usize)> for MatGen<V>
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,