Tord
Tord is a simple data structure to store transitive relations
Usage
use Tord;
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");
}
}