tord

Crates.iotord
lib.rstord
version0.1.7
sourcesrc
created_at2023-10-26 04:05:52.803134
updated_at2023-11-26 22:46:10.715376
descriptionSimple Data structure to store transitive relations
homepage
repositoryhttps://github.com/MovAh13h/tord
max_upload_size
id1014063
size10,710
Tanishq Jain (MovAh13h)

documentation

https://docs.rs/tord

README

Tord

Tord is a simple data structure to store transitive relations

Usage

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");
	}
}
Commit count: 16

cargo fmt