Esempio n. 1
0
def test_greedy_suboptimal_branching1b():
    G = build_branching(greedy_subopt_branching_1b)
    assert_true(recognition.is_arborescence(G), True)
    assert_equal(branchings.branching_weight(G), 127)
Esempio n. 2
0
def test_optimal_arborescence2():
    G = build_branching(optimal_arborescence_2)
    assert_true(recognition.is_arborescence(G), True)
    assert_equal(branchings.branching_weight(G), 51)
Esempio n. 3
0
def test_greedy_suboptimal_branching1b():
    G = build_branching(greedy_subopt_branching_1b)
    assert_true(recognition.is_arborescence(G), True)
    assert_equal(branchings.branching_weight(G), 127)
Esempio n. 4
0
def test_optimal_arborescence2():
    G = build_branching(optimal_arborescence_2)
    assert_true(recognition.is_arborescence(G), True)
    assert_equal(branchings.branching_weight(G),  51)
Esempio n. 5
0
def test_greedy_suboptimal_branching1b():
    G = build_branching(greedy_subopt_branching_1b)
    assert recognition.is_arborescence(G), True
    assert branchings.branching_weight(G) == 127
Esempio n. 6
0
def test_optimal_arborescence2():
    G = build_branching(optimal_arborescence_2)
    assert recognition.is_arborescence(G), True
    assert branchings.branching_weight(G) == 51