Struct Matrix

Source
pub struct Matrix<T: Clone> {
    pub rows: usize,
    pub columns: usize,
    /* private fields */
}
Expand description

Matrix

§Examples:

use polymath::prelude::*;

fn main() {
    let a: Matrix<f64> = Matrix::new((2, 4), 0.0); // Matrix { 2 rows, 4 columns, elements set to 0.0 }
    let b: f64 = 5.0;
    let c: Matrix<f64> = a.clone() + b; // Adds 5 to every element in the Matrix.

    assert!(c - b == a);
}

Fields§

§rows: usize§columns: usize

Implementations§

Source§

impl<T: Clone> Matrix<T>

Source

pub fn new(shape: (usize, usize), element_default: T) -> Self

Create a new matrix

§Examples:
use polymath::prelude::*;

fn main() {
    // New Matrix: { 2 rows, 4 columns, elements set to 0.0 }
    let matrix: Matrix<f64> = Matrix::new((2, 4), 0.0);
}
Source

pub fn from_vec(shape: (usize, usize), data: Vec<T>) -> Option<Self>

Create a new matrix with pre-existing data

§Examples:
use polymath::prelude::*;

fn main() {
    let rows: usize = 2;
    let columns: usize = 2;

    // Making a new vector the size of the matrix, and setting each element to 5.
    let mut data: Vec<u8> = Vec::with_capacity(rows * columns);
    data.resize(rows * columns, 5);

    // New Matrix: { rows, columns, using data vector }
    let matrix: Matrix<u8> = Matrix::from_vec((rows, columns), data).unwrap();
}
Source

pub fn from_2d_vec(data: Vec<Vec<T>>) -> Option<Self>

Source

pub fn vec_len(&self) -> usize

Get the length of the matrix’s underlying vector (recommended to use matrix.len() instead)

Source

pub fn len(&self) -> usize

Get the length of the matrix in elements (rows * columns)

Source

pub fn len_rc(&self) -> (usize, usize)

Get the length of the matrix ((rows, columns))

Source

pub fn get_linear(&self, index: usize) -> Option<T>

Get a value in the matrix’s underlying vector (linear)

Source

pub fn get(&self, pos: (usize, usize)) -> Option<T>

Get a value in the matrix by 2d coordinates (x0 y0 is top left corner)

Source

pub fn set_linear( &mut self, index: usize, value: T, ) -> Result<(), PolymathError>

Set a value in the matrix’s underlying vector (linear)

Source

pub fn set( &mut self, pos: (usize, usize), value: T, ) -> Result<(), PolymathError>

Set a value in the matrix by 2d coordinates (x0 y0 is top left corner)

Source

pub fn linearize(&self, pos: (usize, usize)) -> usize

(Row, Column) -> Index

Source

pub fn delinearize(&self, index: usize) -> (usize, usize)

Index -> (Row, Column)

Trait Implementations§

Source§

impl Add<f32> for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: f32) -> Self

Performs the + operation. Read more
Source§

impl Add<f64> for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: f64) -> Self

Performs the + operation. Read more
Source§

impl Add<i16> for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the + operator.
Source§

fn add(self, other: i16) -> Self

Performs the + operation. Read more
Source§

impl Add<i32> for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the + operator.
Source§

fn add(self, other: i32) -> Self

Performs the + operation. Read more
Source§

impl Add<i64> for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the + operator.
Source§

fn add(self, other: i64) -> Self

Performs the + operation. Read more
Source§

impl Add<i8> for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the + operator.
Source§

fn add(self, other: i8) -> Self

Performs the + operation. Read more
Source§

impl Add<isize> for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the + operator.
Source§

fn add(self, other: isize) -> Self

Performs the + operation. Read more
Source§

impl Add<u16> for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the + operator.
Source§

fn add(self, other: u16) -> Self

Performs the + operation. Read more
Source§

impl Add<u32> for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the + operator.
Source§

fn add(self, other: u32) -> Self

Performs the + operation. Read more
Source§

impl Add<u64> for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the + operator.
Source§

fn add(self, other: u64) -> Self

Performs the + operation. Read more
Source§

impl Add<u8> for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the + operator.
Source§

fn add(self, other: u8) -> Self

Performs the + operation. Read more
Source§

impl Add<usize> for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the + operator.
Source§

fn add(self, other: usize) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<f32>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<f64>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<i16>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<i32>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<i64>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<i8>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<isize>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<u16>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<u32>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<u64>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<u8>) -> Self

Performs the + operation. Read more
Source§

impl Add for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the + operator.
Source§

fn add(self, other: Matrix<usize>) -> Self

Performs the + operation. Read more
Source§

impl<T: Clone + Clone> Clone for Matrix<T>

Source§

fn clone(&self) -> Matrix<T>

Returns a duplicate 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 Debug for Matrix<f32>

Source§

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

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

impl Debug for Matrix<f64>

Source§

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

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

impl Debug for Matrix<i16>

Source§

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

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

impl Debug for Matrix<i32>

Source§

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

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

impl Debug for Matrix<i64>

Source§

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

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

impl Debug for Matrix<i8>

Source§

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

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

impl Debug for Matrix<isize>

Source§

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

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

impl Debug for Matrix<u16>

Source§

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

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

impl Debug for Matrix<u32>

Source§

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

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

impl Debug for Matrix<u64>

Source§

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

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

impl Debug for Matrix<u8>

Source§

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

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

impl Debug for Matrix<usize>

Source§

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

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

impl Div<f32> for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the / operator.
Source§

fn div(self, other: f32) -> Self

Performs the / operation. Read more
Source§

impl Div<f64> for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the / operator.
Source§

fn div(self, other: f64) -> Self

Performs the / operation. Read more
Source§

impl Div<i16> for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the / operator.
Source§

fn div(self, other: i16) -> Self

Performs the / operation. Read more
Source§

impl Div<i32> for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the / operator.
Source§

fn div(self, other: i32) -> Self

Performs the / operation. Read more
Source§

impl Div<i64> for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the / operator.
Source§

fn div(self, other: i64) -> Self

Performs the / operation. Read more
Source§

impl Div<i8> for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the / operator.
Source§

fn div(self, other: i8) -> Self

Performs the / operation. Read more
Source§

impl Div<isize> for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the / operator.
Source§

fn div(self, other: isize) -> Self

Performs the / operation. Read more
Source§

impl Div<u16> for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the / operator.
Source§

fn div(self, other: u16) -> Self

Performs the / operation. Read more
Source§

impl Div<u32> for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the / operator.
Source§

fn div(self, other: u32) -> Self

Performs the / operation. Read more
Source§

impl Div<u64> for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the / operator.
Source§

fn div(self, other: u64) -> Self

Performs the / operation. Read more
Source§

impl Div<u8> for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the / operator.
Source§

fn div(self, other: u8) -> Self

Performs the / operation. Read more
Source§

impl Div<usize> for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the / operator.
Source§

fn div(self, other: usize) -> Self

Performs the / operation. Read more
Source§

impl Mul<f32> for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f32) -> Self

Performs the * operation. Read more
Source§

impl Mul<f64> for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: f64) -> Self

Performs the * operation. Read more
Source§

impl Mul<i16> for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i16) -> Self

Performs the * operation. Read more
Source§

impl Mul<i32> for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i32) -> Self

Performs the * operation. Read more
Source§

impl Mul<i64> for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i64) -> Self

Performs the * operation. Read more
Source§

impl Mul<i8> for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the * operator.
Source§

fn mul(self, other: i8) -> Self

Performs the * operation. Read more
Source§

impl Mul<isize> for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the * operator.
Source§

fn mul(self, other: isize) -> Self

Performs the * operation. Read more
Source§

impl Mul<u16> for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u16) -> Self

Performs the * operation. Read more
Source§

impl Mul<u32> for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u32) -> Self

Performs the * operation. Read more
Source§

impl Mul<u64> for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u64) -> Self

Performs the * operation. Read more
Source§

impl Mul<u8> for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the * operator.
Source§

fn mul(self, other: u8) -> Self

Performs the * operation. Read more
Source§

impl Mul<usize> for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the * operator.
Source§

fn mul(self, other: usize) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<f32>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<f64>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<i16>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<i32>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<i64>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<i8>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<isize>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<u16>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<u32>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<u64>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<u8>) -> Self

Performs the * operation. Read more
Source§

impl Mul for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the * operator.
Source§

fn mul(self, other: Matrix<usize>) -> Self

Performs the * operation. Read more
Source§

impl<T: PartialEq + Clone> PartialEq for Matrix<T>

Source§

fn eq(&self, other: &Matrix<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Rem<f32> for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the % operator.
Source§

fn rem(self, other: f32) -> Self

Performs the % operation. Read more
Source§

impl Rem<f64> for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the % operator.
Source§

fn rem(self, other: f64) -> Self

Performs the % operation. Read more
Source§

impl Rem<i16> for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i16) -> Self

Performs the % operation. Read more
Source§

impl Rem<i32> for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i32) -> Self

Performs the % operation. Read more
Source§

impl Rem<i64> for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i64) -> Self

Performs the % operation. Read more
Source§

impl Rem<i8> for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the % operator.
Source§

fn rem(self, other: i8) -> Self

Performs the % operation. Read more
Source§

impl Rem<isize> for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the % operator.
Source§

fn rem(self, other: isize) -> Self

Performs the % operation. Read more
Source§

impl Rem<u16> for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u16) -> Self

Performs the % operation. Read more
Source§

impl Rem<u32> for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u32) -> Self

Performs the % operation. Read more
Source§

impl Rem<u64> for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u64) -> Self

Performs the % operation. Read more
Source§

impl Rem<u8> for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the % operator.
Source§

fn rem(self, other: u8) -> Self

Performs the % operation. Read more
Source§

impl Rem<usize> for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the % operator.
Source§

fn rem(self, other: usize) -> Self

Performs the % operation. Read more
Source§

impl Sub<f32> for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: f32) -> Self

Performs the - operation. Read more
Source§

impl Sub<f64> for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: f64) -> Self

Performs the - operation. Read more
Source§

impl Sub<i16> for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i16) -> Self

Performs the - operation. Read more
Source§

impl Sub<i32> for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i32) -> Self

Performs the - operation. Read more
Source§

impl Sub<i64> for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i64) -> Self

Performs the - operation. Read more
Source§

impl Sub<i8> for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the - operator.
Source§

fn sub(self, other: i8) -> Self

Performs the - operation. Read more
Source§

impl Sub<isize> for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the - operator.
Source§

fn sub(self, other: isize) -> Self

Performs the - operation. Read more
Source§

impl Sub<u16> for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u16) -> Self

Performs the - operation. Read more
Source§

impl Sub<u32> for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u32) -> Self

Performs the - operation. Read more
Source§

impl Sub<u64> for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u64) -> Self

Performs the - operation. Read more
Source§

impl Sub<u8> for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the - operator.
Source§

fn sub(self, other: u8) -> Self

Performs the - operation. Read more
Source§

impl Sub<usize> for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the - operator.
Source§

fn sub(self, other: usize) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<f32>

Source§

type Output = Matrix<f32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<f32>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<f64>

Source§

type Output = Matrix<f64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<f64>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<i16>

Source§

type Output = Matrix<i16>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<i16>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<i32>

Source§

type Output = Matrix<i32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<i32>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<i64>

Source§

type Output = Matrix<i64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<i64>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<i8>

Source§

type Output = Matrix<i8>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<i8>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<isize>

Source§

type Output = Matrix<isize>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<isize>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<u16>

Source§

type Output = Matrix<u16>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<u16>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<u32>

Source§

type Output = Matrix<u32>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<u32>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<u64>

Source§

type Output = Matrix<u64>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<u64>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<u8>

Source§

type Output = Matrix<u8>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<u8>) -> Self

Performs the - operation. Read more
Source§

impl Sub for Matrix<usize>

Source§

type Output = Matrix<usize>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Matrix<usize>) -> Self

Performs the - operation. Read more
Source§

impl<T: Eq + Clone> Eq for Matrix<T>

Source§

impl<T: Clone> StructuralPartialEq for Matrix<T>

Auto Trait Implementations§

§

impl<T> Freeze for Matrix<T>

§

impl<T> RefUnwindSafe for Matrix<T>
where T: RefUnwindSafe,

§

impl<T> Send for Matrix<T>
where T: Send,

§

impl<T> Sync for Matrix<T>
where T: Sync,

§

impl<T> Unpin for Matrix<T>
where T: Unpin,

§

impl<T> UnwindSafe for Matrix<T>
where T: UnwindSafe,

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.