summaryrefslogtreecommitdiff
path: root/src/lib.rs
blob: fb678232ad4881514143dba051af88464096f158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! Abstraction and APIs for matrix operations
//!
//! Includes handy utilities such as:
//! - Transpose of matrix
//! - Determinant of any N-by-N matrix
//! - Matrix mathematics
//! - TODO:: Inverse matrix
//! - TODO:: Transformation of vectors using matrices
//!
//! Examples:
//! ```
//! use matrix::{Matrix, MatrixMath};
//! use std::str::FromStr;
//! let m = Matrix::from_str("1,2,3\n4,5,6\n7,8,9").expect("Expected this to work");
//! println!("Matrix string formatting:\n{}", m);
//! println!("Evaluate determinant of matrix: {}", m.determinant());
//! println!("Transpose of matrix m:\n{}", m.transpose());
//! 
//! ```

mod matrix;
pub mod error;

#[cfg(test)]
mod tests;

pub use matrix::{Matrix, MatrixMath};

pub fn test() {
    println!("Testing code here");
    let m = Matrix::from(vec![1,2,3,4,5]);
    m.transpose();
    m.determinant();
}