Exemple #1
0
def test_make_commtime_function():
    data = {("a", "b"): {"intercept": 1, "slope": 1}, ("b", "a"): {"intercept": 0, "slope": 10}}

    commtime = make_commtime_function(data, known_shapes)

    assert commtime(dotxx, "a", "b") == 4 * 100 * 100 * 1 + 1
    assert commtime(dotxx, "b", "a") == 4 * 100 * 100 * 10 + 0
Exemple #2
0
def test_make_commtime_function_non_clique_network():
    data = {
        ("a", "b"): {"intercept": 1, "slope": 1},
        ("b", "a"): {"intercept": 0, "slope": 10},
        ("b", "c"): {"intercept": 0, "slope": 10},
    }

    commtime = make_commtime_function(data, known_shapes)

    assert commtime(dotxx, "a", "b") == 4 * 100 * 100 * 1 + 1
    assert commtime(dotxx, "b", "a") == 4 * 100 * 100 * 10 + 0
    assert commtime(dotxx, "c", "a") > 10000
Exemple #3
0
def test_make_commtime_function():
    data = {
        ('a', 'b'): {
            'intercept': 1,
            'slope': 1
        },
        ('b', 'a'): {
            'intercept': 0,
            'slope': 10
        }
    }

    commtime = make_commtime_function(data, known_shapes)

    assert commtime(dotxx, 'a', 'b') == 4 * 100 * 100 * 1 + 1
    assert commtime(dotxx, 'b', 'a') == 4 * 100 * 100 * 10 + 0