예제 #1
0
def distancetree_test1():
    points, D = get_domain(1, 10)

    order = make_distancesequence(D)
    for x in order:
        print('point: ', points[x])

    assert_allclose(points[order[0]], (0, 4))
    assert_allclose(points[order[1]], (0, 7))

    order, G = make_distancetree(D)

    filename = 'out/distancetree_test1'
    draw_graph(G, points, filename)
예제 #2
0
def distancetree_test1():
    points, D = get_domain(1, 10)    

    order = make_distancesequence(D)
    for x in order:
        print('point: ', points[x])

    assert_allclose(points[order[0]], (0, 4))
    assert_allclose(points[order[1]], (0, 7))

    order, G = make_distancetree(D)
    
    filename = 'out/distancetree_test1'
    draw_graph(G, points, filename)
예제 #3
0
def distancetree_test3():
    points, D = get_domain(10, 10, noise=0.2)
    _, G = make_distancetree(D)
    filename = 'out/distancetree_test3'
    draw_graph(G, points, filename)
예제 #4
0
def distancetree_test3():
    points, D = get_domain(10, 10, noise=0.2)    
    _, G = make_distancetree(D)
    filename = 'out/distancetree_test3'    
    draw_graph(G, points, filename)