1 unstable release

0.1.0 Jun 23, 2020

#2510 in Algorithms

MIT/Apache

7KB

Bareiss algorithm

Bareiss algorithm calculates the determinant of an integer square matrix only using integer arithmetics.

Usage

Add this to your Cargo.toml:

[dependencies]
bareiss = "0.1"

Example


use bareiss::bareiss_determinant;

let mut matrix = vec![1, 2, 3, 10];
assert_eq!(bareiss_determinant(&mut matrix, 2).unwrap(), 4);

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


lib.rs:

Utilities for random number generation

Bareiss algorithm calculates the determinant of an integer square matrix only using integer arithmetics.

Examples

use bareiss::bareiss_determinant;

let mut matrix = vec![1, 2, 3, 10];
assert_eq!(bareiss_determinant(&mut matrix, 2).unwrap(), 4);

No runtime deps