graphlib_rust 0.0.4

Dagre's Graphlib implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
use std::fmt::Debug;
use crate::algo::dfs::dfs;
use crate::Graph;

// TODO: need to check if exceptions are required
pub fn preorder<GL: Default, N: Default + Clone + Debug, E: Default + Clone + Debug>(g: &mut Graph<GL, N, E>, vs: &Vec<String>) -> Vec<String> {
  return match dfs(g, vs, "pre") {
    Ok(t) => t,
    _ => vec![]
  };
}