goatd 0.1.1

Greatest Of All Tree Decompositions: tree decompositions of graphs — elimination orders, FlowCutter, multilevel bisection — with PACE .gr/.td I/O and a command-line solver.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::{TdBag, sorted_lists_intersect};

#[test]
fn algorithm_bag_preserves_its_stable_vertex_order() {
    assert_eq!(
        TdBag::from_algorithm_order(vec![3, 1, 2]).vertices(),
        [3, 1, 2],
    );
}

#[test]
fn sorted_holder_intersection_detects_only_a_shared_bag() {
    assert!(sorted_lists_intersect(&[1, 4, 9], &[0, 4, 8]));
    assert!(!sorted_lists_intersect(&[1, 4, 9], &[0, 3, 8]));
}

mod validation;