Struct Matrix

Source
pub struct Matrix { /* private fields */ }

Implementations§

Source§

impl Matrix

Source

pub fn from(matrix: Vec<Vec<f64>>) -> Matrix

Source

pub fn n(&self) -> usize

Source

pub fn m(&self) -> usize

Source

pub fn is_square(&self) -> bool

Source

pub fn transpose(&self) -> Matrix

Source

pub fn iter(&self) -> Iter<'_, Vec<f64>>

Source

pub fn inv(&self) -> Matrix

Source

pub fn line(&self, i: usize) -> Vector

returns vector of copy of line i

Source

pub fn diagonal(vec: Vector) -> Matrix

Trait Implementations§

Source§

impl<'a, 'b> Add<&'a Matrix> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Matrix) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Matrix) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a, 'b> Add<&'a f64> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<&'a f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<'a> Add<Matrix> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Matrix) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<f64> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Matrix) -> Self::Output

Performs the + operation. Read more
Source§

impl Clone for Matrix

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, 'b> Div<&'a Matrix> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Matrix) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div<&'a Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Matrix) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a, 'b> Div<&'a f64> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<'a> Div<&'a f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl<'a> Div<Matrix> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Matrix) -> Self::Output

Performs the / operation. Read more
Source§

impl<'a> Div<f64> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Matrix) -> Self::Output

Performs the / operation. Read more
Source§

impl Dot<Matrix> for Vector

Source§

type Output = Vector

Source§

fn dot(&self, rhs: &Matrix) -> Self::Output

Source§

impl Dot<Vector> for Matrix

Source§

type Output = Vector

Source§

fn dot(&self, rhs: &Vector) -> Self::Output

Source§

impl Dot for Matrix

Source§

type Output = Matrix

Source§

fn dot(&self, rhs: &Matrix) -> Self::Output

Source§

impl Index<(usize, usize)> for Matrix

Source§

type Output = f64

The returned type after indexing.
Source§

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

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

impl Index<usize> for Matrix

Source§

type Output = Vec<f64>

The returned type after indexing.
Source§

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

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

impl IndexMut<(usize, usize)> for Matrix

Source§

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

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

impl IndexMut<usize> for Matrix

Source§

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

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

impl Init for Matrix

Source§

type Output = Matrix

Source§

type Size = (usize, usize)

Source§

fn init(value: f64, size: Self::Size) -> Self::Output

Source§

fn init_func<F>(func: F, size: Self::Size) -> Self::Output
where F: Fn(Self::Size) -> f64,

Source§

fn zeros(size: Self::Size) -> Self::Output

Source§

fn ones(size: Self::Size) -> Self::Output

Source§

impl<'a, 'b> Mul<&'a Matrix> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a, 'b> Mul<&'a f64> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<Matrix> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<'a> Mul<f64> for &'a Matrix

Source§

type Output = Matrix

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 Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Neg for &Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl<'a, 'b> Sub<&'a Matrix> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Matrix) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Matrix) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a, 'b> Sub<&'a f64> for &'b Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<'a> Sub<Matrix> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Matrix) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<f64> for &'a Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<f64> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Matrix) -> Self::Output

Performs the - operation. Read more

Auto Trait Implementations§

§

impl Freeze for Matrix

§

impl RefUnwindSafe for Matrix

§

impl Send for Matrix

§

impl Sync for Matrix

§

impl Unpin for Matrix

§

impl UnwindSafe for Matrix

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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

Source§

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

Source§

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.