matrix_math/lib.rs
1//! ## Description
2//!
3//! A simple library/CLI app for matrix math in Rust using Clap and thiserror.
4//!
5//! ### Getting started
6//!
7//! ```rs
8//! use matrix::prelude::*;
9//!
10//! fn interactive_matrices_example() -> Result<(), Error> {
11//! let matrix1 = matrix(1, None, None);
12//!
13//! // By calling matrix2 with the length parameters of matrix1 like so. Doing the operations
14//! // unchecked is **SAFE**.
15//! let matrix2 = matrix(2, Some(matrix1.len()), Some(matrix1[0].len()));
16//!
17//! let sum = matrix_operation_unchecked(MatrixOperation::Addition, &matrix1, &matrix2);
18//! println!("Sum:\n{:#?}", sum);
19//!
20//! let diff = matrix_operation_unchecked(MatrixOperation::Subtraction, &matrix1, &matrix2);
21//! println!("Difference:\n{:#?}", diff);
22//!
23//! let product = matrix_operation_unchecked(MatrixOperation::Multiplication, &matrix1, &matrix2);
24//! println!("Product:\n{:#?}", product);
25//!
26//! Ok(())
27//! }
28//!
29//! fn main() -> Result<(), Error> {
30//! let args = Args::parse();
31//!
32//! if args.interactive {
33//! interactive_matrices_example()?;
34//! }
35//!
36//! Ok(())
37//! }
38//! ```
39//!
40//!
41//!
42
43// #![warn(missing_docs)]
44
45pub mod enums;
46pub mod error;
47pub mod prelude;
48pub mod structs;
49pub mod types;
50pub mod utils;