示例#1
0
def test_avg_methods_return_0_for_too_small_trees():
    tree = RTree([Vec3()])
    assert tree.avg_leaf_size() == 0.0
    assert tree.avg_spherical_envelope_radius() == 0.0
    assert tree.avg_nn_distance() == 0.0
示例#2
0
def test_average_leaf_size_of_random_points():
    tree = RTree([Vec3.random(100) for _ in range(100)])
    size = tree.avg_leaf_size()
    assert size > 10.0