Beispiel #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
Beispiel #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
Beispiel #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