This program calculates if a matrix conforms to certain relations, and also can calculate how to transform a matrix to conform to the relation. It is capable of processing all properties of a matrix of 10 billion pairs in around 6 seconds.
To get started, clone the repository using Git and enter the directory, and then follow the steps under running
git clone https://github.com/G2-Games/relations-rs.git
cd relations-rs
Simply use the following command to compile and run the program:
cargo run
The input matrix can be adjusted by modifying the matrix at the beginning of
the main
function. Ensure it is square, otherwise it will not compile.
// Modify this matrix
let input_matrix = [
[1, 0, 0, 1],
[0, 1, 1, 0],
[0, 1, 1, 0],
[1, 0, 1, 1]
];
To run the unit tests, use the command:
cargo test