コード例 #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)
コード例 #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)
コード例 #3
0
ファイル: test_branchings.py プロジェクト: 666888/networkx
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)
コード例 #4
0
ファイル: test_branchings.py プロジェクト: 666888/networkx
def test_optimal_arborescence2():
    G = build_branching(optimal_arborescence_2)
    assert_true(recognition.is_arborescence(G), True)
    assert_equal(branchings.branching_weight(G),  51)
コード例 #5
0
ファイル: test_branchings.py プロジェクト: ArtShp/DataScience
def test_greedy_suboptimal_branching1b():
    G = build_branching(greedy_subopt_branching_1b)
    assert recognition.is_arborescence(G), True
    assert branchings.branching_weight(G) == 127
コード例 #6
0
ファイル: test_branchings.py プロジェクト: ArtShp/DataScience
def test_optimal_arborescence2():
    G = build_branching(optimal_arborescence_2)
    assert recognition.is_arborescence(G), True
    assert branchings.branching_weight(G) == 51