Matrix

Struct Matrix 

Source
pub struct Matrix {
    pub nrows: usize,
    pub ncols: usize,
    /* private fields */
}
Expand description

Matrix struct.

Fields§

§nrows: usize§ncols: usize

Implementations§

Source§

impl Matrix

Source

pub fn empty() -> Self

Source

pub fn zeros(nrows: usize, ncols: usize) -> Self

Make a matrix filled with zeros.

Source

pub fn ones(nrows: usize, ncols: usize) -> Self

Make a matrix filled with ones.

Source

pub fn empty_size(nrows: usize, ncols: usize) -> Self

Make an empty matrix with a given size

Source

pub fn eye(dims: usize) -> Self

Make an identity matrix with size dims.

Source

pub fn is_square(&self) -> bool

Check whether the matrix is square.

Source

pub fn inv(&self) -> Self

Invert the matrix.

Source

pub fn is_symmetric(&self) -> bool

Check whether the matrix is symmetric.

Source

pub fn close_to(&self, other: &Matrix, tol: f64) -> bool

Check whether a matrix is close to another matrix within some tolerance.

Source

pub fn is_positive_definite(&self) -> bool

Check whether the matrix is positive definite.

Source

pub fn forward_substitution(&self, b: &[f64]) -> Vector

Solve a matrix equation of the form Lx=b, where L is a lower triangular matrix. See the Wikipedia page.

Source

pub fn backward_substitution(&self, b: &[f64]) -> Vector

Solve a matrix equation of the form Ux=b, where U is an upper triangular matrix. See the Wikipedia page.

Source

pub fn cholesky(&self) -> Matrix

Return the Cholesky decomposition of the matrix. Resulting matrix is lower triangular.

Source

pub fn lu(&self) -> (Matrix, Vec<i32>)

Source

pub fn det(&self) -> f64

Calculates the determinant of the matrix using the LU decomposition.

Source

pub fn lu_det(&self, piv: &[i32]) -> f64

Calculates the determinant of an LU decomposed matrix.

Source

pub fn is_upper_triangular(&self) -> bool

Check whether the matrix is upper triangular (i.e., all the entries below the diagonal are 0).

Source

pub fn is_lower_triangular(&self) -> bool

Check whether the matrix is lower triangular (i.e., all the entries above the diagonal are 0).

Source

pub fn diag(&self) -> Vector

Get the diagonal elements of the matrix.

Source

pub fn new<T>(data: T, nrows: i32, ncols: i32) -> Self
where T: Into<Vector>,

Make a new matrix with the given number of rows and columns.

Source

pub fn shape(&self) -> [usize; 2]

Get the number of rows and columns in the matrix.

Source

pub fn size(&self) -> usize

Get the total number of elements in the matrix.

Source

pub fn reshape_mut(&mut self, nrows: i32, ncols: i32) -> &mut Self

Reshape the matrix in-place. A size of -1 in either the rows or the columns means that the size for that dimension will be automatically determined if possible.

Source

pub fn reshape(&self, nrows: i32, ncols: i32) -> Self

Reshape the matrix. A size of -1 in either the rows or the columns means that the size for that dimension will be automatically determined if possible.

Source

pub fn apply_along_row<F>(&mut self, row: usize, f: F)
where F: Fn(f64) -> f64,

Apply a closure to every element in a row. The closure should take a value and return the value to replace it with.

Source

pub fn apply_along_col<F>(&mut self, col: usize, f: F)
where F: Fn(f64) -> f64,

Apply a closure to every element in a row.

Source

pub fn get_row_as_vector(&self, row: usize) -> Vector

Return a copy of the row of the matrix as a Vector.

Source

pub fn get_col_as_vector(&self, col: usize) -> Vector

Return a copy of the column of the matrix as a Vector.

Source

pub fn sum_rows(&self) -> Vector

Sum the matrix across the rows.

Source

pub fn sum_cols(&self) -> Vector

Sum the matrix down the columns.

Source

pub fn inf_norm(&self) -> f64

Calculates the infinity norm of the matrix.

Source

pub fn flat_idx(&self, idx: usize) -> f64

Source

pub fn flat_idx_replace(&mut self, idx: usize, val: f64) -> &mut Self

Source

pub fn t(&self) -> Self

Transpose the matrix.

Source

pub fn t_mut(&mut self) -> &mut Self

Transpose the matrix in-place.

Source

pub fn data(&self) -> &Vector

Return a reference to the underlying Vector holding the data.

Source

pub fn data_mut(&mut self) -> &mut Vector

Return a mutable reference to the underlying Vector holding the data.

Source

pub fn to_vec(self) -> Vector

Converts the matrix to a Vector.

Source

pub fn hcat(&self, other: Self) -> Self

Horizontal concatenation of matrices. Adds other to the right of the calling matrix.

Source

pub fn vcat(&self, other: Self) -> Self

Vertical concatenation of matrices. Adds other below the calling matrix.

Source

pub fn hrepeat(&self, n: usize) -> Self

Repeat self horizontally. That is, make n total copies of self and horizontally concatenate them all together.

Source

pub fn vrepeat(&self, n: usize) -> Self

Repeat self vertically. That is, make n total copies of self and vertically concatenate them all together.

Source§

impl Matrix

Source

pub fn ln(&self) -> Self

Apply the f64 operation ln element-wise to the matrix.

Source§

impl Matrix

Source

pub fn ln_1p(&self) -> Self

Apply the f64 operation ln_1p element-wise to the matrix.

Source§

impl Matrix

Source

pub fn log10(&self) -> Self

Apply the f64 operation log10 element-wise to the matrix.

Source§

impl Matrix

Source

pub fn log2(&self) -> Self

Apply the f64 operation log2 element-wise to the matrix.

Source§

impl Matrix

Source

pub fn exp(&self) -> Self

Apply the f64 operation exp element-wise to the matrix.

Source§

impl Matrix

Source

pub fn exp2(&self) -> Self

Apply the f64 operation exp2 element-wise to the matrix.

Source§

impl Matrix

Source

pub fn exp_m1(&self) -> Self

Apply the f64 operation exp_m1 element-wise to the matrix.

Source§

impl Matrix

Source

pub fn sin(&self) -> Self

Apply the f64 operation sin element-wise to the matrix.

Source§

impl Matrix

Source

pub fn cos(&self) -> Self

Apply the f64 operation cos element-wise to the matrix.

Source§

impl Matrix

Source

pub fn tan(&self) -> Self

Apply the f64 operation tan element-wise to the matrix.

Source§

impl Matrix

Source

pub fn sinh(&self) -> Self

Apply the f64 operation sinh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn cosh(&self) -> Self

Apply the f64 operation cosh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn tanh(&self) -> Self

Apply the f64 operation tanh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn asin(&self) -> Self

Apply the f64 operation asin element-wise to the matrix.

Source§

impl Matrix

Source

pub fn acos(&self) -> Self

Apply the f64 operation acos element-wise to the matrix.

Source§

impl Matrix

Source

pub fn atan(&self) -> Self

Apply the f64 operation atan element-wise to the matrix.

Source§

impl Matrix

Source

pub fn asinh(&self) -> Self

Apply the f64 operation asinh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn acosh(&self) -> Self

Apply the f64 operation acosh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn atanh(&self) -> Self

Apply the f64 operation atanh element-wise to the matrix.

Source§

impl Matrix

Source

pub fn sqrt(&self) -> Self

Apply the f64 operation sqrt element-wise to the matrix.

Source§

impl Matrix

Source

pub fn cbrt(&self) -> Self

Apply the f64 operation cbrt element-wise to the matrix.

Source§

impl Matrix

Source

pub fn abs(&self) -> Self

Apply the f64 operation abs element-wise to the matrix.

Source§

impl Matrix

Source

pub fn floor(&self) -> Self

Apply the f64 operation floor element-wise to the matrix.

Source§

impl Matrix

Source

pub fn ceil(&self) -> Self

Apply the f64 operation ceil element-wise to the matrix.

Source§

impl Matrix

Source

pub fn to_radians(&self) -> Self

Apply the f64 operation to_radians element-wise to the matrix.

Source§

impl Matrix

Source

pub fn to_degrees(&self) -> Self

Apply the f64 operation to_degrees element-wise to the matrix.

Source§

impl Matrix

Source

pub fn recip(&self) -> Self

Apply the f64 operation recip element-wise to the matrix.

Source§

impl Matrix

Source

pub fn round(&self) -> Self

Apply the f64 operation round element-wise to the matrix.

Source§

impl Matrix

Source

pub fn signum(&self) -> Self

Apply the f64 operation signum element-wise to the matrix.

Source§

impl Matrix

Source

pub fn powi(&self, arg: i32) -> Self

Apply the f64 operation powi element-wise to the matrix.

Source§

impl Matrix

Source

pub fn powf(&self, arg: f64) -> Self

Apply the f64 operation powf element-wise to the matrix.

Source§

impl Matrix

Source

pub fn norm(&self) -> f64

Source

pub fn max(&self) -> f64

Source

pub fn mean(&self) -> f64

Source

pub fn min(&self) -> f64

Source

pub fn std(&self) -> f64

Source

pub fn sum(&self) -> f64

Source

pub fn prod(&self) -> f64

Source

pub fn var(&self) -> f64

Source

pub fn sample_std(&self) -> f64

Source

pub fn sample_var(&self) -> f64

Trait Implementations§

Source§

impl Add<&Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, other: &Vector) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, other: &Vector) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, other: Vector) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the + operator.
Source§

fn add(self, other: Vector) -> 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, other: 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, other: 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, other: Matrix) -> Self::Output

Performs the + operation. Read more
Source§

impl AddAssign<&Matrix> for Matrix

Source§

fn add_assign(&mut self, other: &Matrix)

Performs the += operation. Read more
Source§

impl AddAssign<f64> for Matrix

Source§

fn add_assign(&mut self, other: f64)

Performs the += operation. Read more
Source§

impl AddAssign for Matrix

Source§

fn add_assign(&mut self, other: Matrix)

Performs the += operation. Read more
Source§

impl Clone for Matrix

Source§

fn clone(&self) -> Matrix

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

Source§

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

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

impl Default for Matrix

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Matrix

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Matrix

Source§

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

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

impl Div<&Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, other: &Vector) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, other: &Vector) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, other: Vector) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the / operator.
Source§

fn div(self, other: Vector) -> 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, other: 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, other: 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, other: Matrix) -> Self::Output

Performs the / operation. Read more
Source§

impl DivAssign<&Matrix> for Matrix

Source§

fn div_assign(&mut self, other: &Matrix)

Performs the /= operation. Read more
Source§

impl DivAssign<f64> for Matrix

Source§

fn div_assign(&mut self, other: f64)

Performs the /= operation. Read more
Source§

impl DivAssign for Matrix

Source§

fn div_assign(&mut self, other: Matrix)

Performs the /= operation. Read more
Source§

impl Dot<&Matrix, Matrix> for &Matrix

Source§

fn dot(&self, other: &Matrix) -> Matrix

Performs dot product of self and other.
Source§

fn t_dot(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<&Matrix, Matrix> for Matrix

Source§

fn dot(&self, other: &Matrix) -> Matrix

Performs dot product of self and other.
Source§

fn t_dot(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: &Matrix) -> Matrix

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<&Matrix, Vector> for &Vector

Source§

fn dot(&self, other: &Matrix) -> Vector

Performs dot product of self and other.
Source§

fn t_dot(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<&Matrix, Vector> for Vector

Source§

fn dot(&self, other: &Matrix) -> Vector

Performs dot product of self and other.
Source§

fn t_dot(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: &Matrix) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<&Vector, Vector> for &Matrix

Source§

fn dot(&self, other: &Vector) -> Vector

Performs dot product of self and other.
Source§

fn dot_t(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn t_dot_t(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<&Vector, Vector> for Matrix

Source§

fn dot(&self, other: &Vector) -> Vector

Performs dot product of self and other.
Source§

fn dot_t(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn t_dot_t(&self, other: &Vector) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Matrix, Matrix> for &Matrix

Source§

fn dot(&self, other: Matrix) -> Matrix

Performs dot product of self and other.
Source§

fn t_dot(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Matrix, Matrix> for Matrix

Source§

fn dot(&self, other: Matrix) -> Matrix

Performs dot product of self and other.
Source§

fn t_dot(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: Matrix) -> Matrix

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Matrix, Vector> for &Vector

Source§

fn dot(&self, other: Matrix) -> Vector

Performs dot product of self and other.
Source§

fn t_dot(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Matrix, Vector> for Vector

Source§

fn dot(&self, other: Matrix) -> Vector

Performs dot product of self and other.
Source§

fn t_dot(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn dot_t(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot_t(&self, other: Matrix) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Vector, Vector> for &Matrix

Source§

fn dot(&self, other: Vector) -> Vector

Performs dot product of self and other.
Source§

fn dot_t(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn t_dot_t(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Dot<Vector, Vector> for Matrix

Source§

fn dot(&self, other: Vector) -> Vector

Performs dot product of self and other.
Source§

fn dot_t(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing other.
Source§

fn t_dot(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing self.
Source§

fn t_dot_t(&self, other: Vector) -> Vector

Performs dot product of self and other, transposing both self and other.
Source§

impl Index<[usize; 2]> for Matrix

Source§

type Output = f64

The returned type after indexing.
Source§

fn index(&self, [i, j]: [usize; 2]) -> &Self::Output

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

impl Index<usize> for Matrix

Source§

type Output = [f64]

The returned type after indexing.
Source§

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

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

impl IndexMut<[usize; 2]> for Matrix

Source§

fn index_mut(&mut self, [i, j]: [usize; 2]) -> &mut Self::Output

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

impl IndexMut<usize> for Matrix

Source§

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

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

impl<'a> IntoIterator for &'a Matrix

Source§

type Item = &'a [f64]

The type of the elements being iterated over.
Source§

type IntoIter = Chunks<'a, f64>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> IntoIterator for &'a mut Matrix

Source§

type Item = &'a mut [f64]

The type of the elements being iterated over.
Source§

type IntoIter = ChunksMut<'a, f64>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl Kernel<&Matrix, Matrix> for RBFKernel

Source§

fn forward(&self, x: &Matrix, y: &Matrix) -> Matrix

Source§

impl Kernel<&Matrix, Matrix> for RationalQuadraticKernel

Source§

fn forward(&self, x: &Matrix, y: &Matrix) -> Matrix

Source§

impl Kernel<&Vector, Matrix> for RBFKernel

Source§

fn forward(&self, x: &Vector, y: &Vector) -> Matrix

Source§

impl Kernel<&Vector, Matrix> for RationalQuadraticKernel

Source§

fn forward(&self, x: &Vector, y: &Vector) -> Matrix

Source§

impl Kernel<Matrix, Matrix> for RBFKernel

Source§

fn forward(&self, x: Matrix, y: Matrix) -> Matrix

Source§

impl Kernel<Matrix, Matrix> for RationalQuadraticKernel

Source§

fn forward(&self, x: Matrix, y: Matrix) -> Matrix

Source§

impl Kernel<Vector, Matrix> for RBFKernel

Source§

fn forward(&self, x: Vector, y: Vector) -> Matrix

Source§

impl Kernel<Vector, Matrix> for RationalQuadraticKernel

Source§

fn forward(&self, x: Vector, y: Vector) -> Matrix

Source§

impl Mul<&Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Vector) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

fn mul(self, other: &Vector) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

fn mul(self, other: Vector) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the * operator.
Source§

fn mul(self, other: Vector) -> 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, other: 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, other: 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, other: Matrix) -> Self::Output

Performs the * operation. Read more
Source§

impl MulAssign<&Matrix> for Matrix

Source§

fn mul_assign(&mut self, other: &Matrix)

Performs the *= operation. Read more
Source§

impl MulAssign<f64> for Matrix

Source§

fn mul_assign(&mut self, other: f64)

Performs the *= operation. Read more
Source§

impl MulAssign for Matrix

Source§

fn mul_assign(&mut self, other: Matrix)

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 PartialEq for Matrix

Source§

fn eq(&self, other: &Matrix) -> 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 Serialize for Matrix

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Solve<Matrix> for Matrix

Source§

fn cholesky_solve(&self, system: &Matrix) -> Matrix

Source§

fn lu_solve(&self, pivots: &[i32], system: &Matrix) -> Matrix

Source§

fn solve(&self, system: &Matrix) -> Matrix

Source§

impl Solve<Vector> for Matrix

Source§

fn lu_solve(&self, pivots: &[i32], system: &Vector) -> Vector

Solve the linear system Ax = b given a LU decomposed matrix A. The first argument should be a tuple, where the first element is the LU decomposed matrix and the second element is the pivots P.

Source§

fn solve(&self, system: &Vector) -> Vector

Solve the linear system Ax = b using LU decomposition.

Source§

fn cholesky_solve(&self, system: &Vector) -> Vector

Source§

impl Sub<&Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Matrix> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Vector) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, other: &Vector) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Matrix> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Matrix> for &Vector

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Matrix> for Vector

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Matrix> for f64

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Vector> for &Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, other: Vector) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Vector> for Matrix

Source§

type Output = Matrix

The resulting type after applying the - operator.
Source§

fn sub(self, other: Vector) -> 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, other: 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, other: 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, other: Matrix) -> Self::Output

Performs the - operation. Read more
Source§

impl SubAssign<&Matrix> for Matrix

Source§

fn sub_assign(&mut self, other: &Matrix)

Performs the -= operation. Read more
Source§

impl SubAssign<f64> for Matrix

Source§

fn sub_assign(&mut self, other: f64)

Performs the -= operation. Read more
Source§

impl SubAssign for Matrix

Source§

fn sub_assign(&mut self, other: Matrix)

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,