Incremental Topo
A data structure for maintaining an topological ordering in an incremental fashion.
Usage
To use incremental-topo
, first add this to your Cargo.toml
:
[]
= "0.1"
Next, add this to your crate:
extern crate incremental_topo;
use IncrTopo;
let mut dag = new;
dag.add_node;
dag.add_node;
dag.add_node;
assert_eq!;
dag.add_dependency.unwrap;
dag.add_dependency.unwrap;
dag.add_dependency.unwrap;
let animal_order: = dag.descendants.unwrap.map.collect;
assert_eq!;
See documentation for more details.
License
This project is dual licensed under the MIT license and Apache 2.0 license.