| Crates.io | tord |
| lib.rs | tord |
| version | 0.1.7 |
| created_at | 2023-10-26 04:05:52.803134+00 |
| updated_at | 2023-11-26 22:46:10.715376+00 |
| description | Simple Data structure to store transitive relations |
| homepage | |
| repository | https://github.com/MovAh13h/tord |
| max_upload_size | |
| id | 1014063 |
| size | 10,710 |
Tord is a simple data structure to store transitive relations
use tord::Tord;
fn main() {
let mut t = Tord::new();
t.insert((5, 6));
t.insert((6, 10));
t.insert((10, 19));
// We did not add (19, 6) but because of Transitivity,
// this relation exists
if t.check_relation((19, 6)) {
println!("Found it!");
} else {
println!("Relation does not exist");
}
}