Crate matrix [−] [src]
Matrix laboratory.
Formats
The following storage formats are supported:
Banded, suitable for matrices with a small number of superdiagonals and/or subdiagonals;
Compressed, suitable for generic sparse matrices;
Conventional, suitable for dense matrices;
Diagonal, suitable for diagonal matrices; and
Packed, suitable for symmetric, Hermitian, and triangular matrices.
Example
#[macro_use] extern crate matrix; use matrix::prelude::*; let mut sparse = Compressed::zero((2, 4)); sparse.set((0, 0), 42.0); sparse.set((1, 3), 69.0); let dense = Conventional::from(&sparse); assert_eq!(&*dense, &*matrix![ 42.0, 0.0, 0.0, 0.0; 0.0, 0.0, 0.0, 69.0; ]);
Modules
decomposition |
Decompositions. |
format |
Storage formats. |
operation |
Basic operations. |
prelude |
Reexports of modules, traits, and types. |
Macros
matrix! |
A macro for composing matrices in the natural order. |
Structs
Error |
An error. |
Traits
Element |
An element. |
Matrix |
A matrix. |
Number |
The base trait for numeric types |
Position |
A position. |
Size |
A size. |
Type Definitions
Result |
A result. |
c32 |
A complex number with 32-bit parts. |
c64 |
A complex number with 64-bit parts. |