[mlpack-svn] r10890 - mlpack/tags/mlpack-1.0/src/mlpack/tests

fastlab-svn at coffeetalk-1.cc.gatech.edu fastlab-svn at coffeetalk-1.cc.gatech.edu
Sat Dec 17 03:41:52 EST 2011


Author: rcurtin
Date: 2011-12-17 03:41:52 -0500 (Sat, 17 Dec 2011)
New Revision: 10890

Modified:
   mlpack/tags/mlpack-1.0/src/mlpack/tests/tree_test.cpp
Log:
Remove PeriodicHRectBound tests.


Modified: mlpack/tags/mlpack-1.0/src/mlpack/tests/tree_test.cpp
===================================================================
--- mlpack/tags/mlpack-1.0/src/mlpack/tests/tree_test.cpp	2011-12-17 08:40:51 UTC (rev 10889)
+++ mlpack/tags/mlpack-1.0/src/mlpack/tests/tree_test.cpp	2011-12-17 08:41:52 UTC (rev 10890)
@@ -630,531 +630,6 @@
 }
 
 /**
- * Ensure that a bound, by default, is empty and has no dimensionality, and the
- * box size vector is empty.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundEmptyConstructor)
-{
-  PeriodicHRectBound<2> b;
-
-  BOOST_REQUIRE_EQUAL(b.Dim(), 0);
-  BOOST_REQUIRE_EQUAL(b.box().n_elem, 0);
-}
-
-/**
- * Ensure that when we specify the dimensionality in the constructor, it is
- * correct, and the bounds are all the empty set.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundBoxConstructor)
-{
-  PeriodicHRectBound<2> b(arma::vec("5 6"));
-
-  BOOST_REQUIRE_EQUAL(b.Dim(), 2);
-  BOOST_REQUIRE_SMALL(b[0].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(b[1].Width(), 1e-5);
-  BOOST_REQUIRE_EQUAL(b.box().n_elem, 2);
-  BOOST_REQUIRE_CLOSE(b.box()[0], 5.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(b.box()[1], 6.0, 1e-5);
-
-  PeriodicHRectBound<2> d(arma::vec("2 3 4 5 6"));
-
-  BOOST_REQUIRE_EQUAL(d.Dim(), 5);
-  BOOST_REQUIRE_SMALL(d[0].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(d[1].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(d[2].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(d[3].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(d[4].Width(), 1e-5);
-  BOOST_REQUIRE_EQUAL(d.box().n_elem, 5);
-  BOOST_REQUIRE_CLOSE(d.box()[0], 2.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(d.box()[1], 3.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(d.box()[2], 4.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(d.box()[3], 5.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(d.box()[4], 6.0, 1e-5);
-}
-
-/**
- * Test the copy constructor.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundCopyConstructor)
-{
-  PeriodicHRectBound<2> b(arma::vec("3 4"));
-  b[0] = Range(0.0, 2.0);
-  b[1] = Range(2.0, 3.0);
-
-  PeriodicHRectBound<2> c(b);
-
-  BOOST_REQUIRE_EQUAL(c.Dim(), 2);
-  BOOST_REQUIRE_SMALL(c[0].Lo(), 1e-5);
-  BOOST_REQUIRE_CLOSE(c[0].Hi(), 2.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c[1].Lo(), 2.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c[1].Hi(), 3.0, 1e-5);
-  BOOST_REQUIRE_EQUAL(c.box().n_elem, 2);
-  BOOST_REQUIRE_CLOSE(c.box()[0], 3.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c.box()[1], 4.0, 1e-5);
-}
-
-/**
- * Test the assignment operator.
- *
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundAssignmentOperator)
-{
-  PeriodicHRectBound<2> b(arma::vec("3 4"));
-  b[0] = Range(0.0, 2.0);
-  b[1] = Range(2.0, 3.0);
-
-  PeriodicHRectBound<2> c(arma::vec("3 4 5 6"));
-
-  c = b;
-
-  BOOST_REQUIRE_EQUAL(c.Dim(), 2);
-  BOOST_REQUIRE_SMALL(c[0].Lo(), 1e-5);
-  BOOST_REQUIRE_CLOSE(c[0].Hi(), 2.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c[1].Lo(), 2.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c[1].Hi(), 3.0, 1e-5);
-  BOOST_REQUIRE_EQUAL(c.box().n_elem, 2);
-  BOOST_REQUIRE_CLOSE(c.box()[0], 3.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(c.box()[1], 4.0, 1e-5);
-}*/
-
-/**
- * Ensure that we can set the box size correctly.
- *
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundSetBoxSize)
-{
-  PeriodicHRectBound<2> b(arma::vec("1 2"));
-
-  b.SetBoxSize(arma::vec("10 12"));
-
-  BOOST_REQUIRE_EQUAL(b.box().n_elem, 2);
-  BOOST_REQUIRE_CLOSE(b.box()[0], 10.0, 1e-5);
-  BOOST_REQUIRE_CLOSE(b.box()[1], 12.0, 1e-5);
-}*/
-
-/**
- * Ensure that we can clear the dimensions correctly.  This does not involve the
- * box size at all, so the test can be identical to the HRectBound test.
- *
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundClear)
-{
-  // We'll do this with two dimensions only.
-  PeriodicHRectBound<2> b(arma::vec("5 5"));
-
-  b[0] = Range(0.0, 2.0);
-  b[1] = Range(2.0, 4.0);
-
-  // Now we just need to make sure that we clear the range.
-  b.Clear();
-
-  BOOST_REQUIRE_SMALL(b[0].Width(), 1e-5);
-  BOOST_REQUIRE_SMALL(b[1].Width(), 1e-5);
-}*/
-
-/**
- * Ensure that we get the correct centroid for our bound.
- *
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundCentroid) {
-  // Create a simple 3-dimensional bound.  The centroid is not affected by the
-  // periodic coordinates.
-  PeriodicHRectBound<2> b(arma::vec("100 100 100"));
-
-  b[0] = Range(0.0, 5.0);
-  b[1] = Range(-2.0, -1.0);
-  b[2] = Range(-10.0, 50.0);
-
-  arma::vec centroid;
-
-  b.Centroid(centroid);
-
-  BOOST_REQUIRE_EQUAL(centroid.n_elem, 3);
-  BOOST_REQUIRE_CLOSE(centroid[0], 2.5, 1e-5);
-  BOOST_REQUIRE_CLOSE(centroid[1], -1.5, 1e-5);
-  BOOST_REQUIRE_CLOSE(centroid[2], 20.0, 1e-5);
-}*/
-
-/**
- * Correctly calculate the minimum distance between the bound and a point in
- * periodic coordinates.  We have to account for the shifts necessary in
- * periodic coordinates too, so that makes testing this a little more difficult.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMinDistancePoint)
-{
-  // First, we'll start with a simple 2-dimensional case where the point is
-  // inside the bound, then on the edge of the bound, then barely outside the
-  // bound.  The box size will be large enough that this is basically the
-  // HRectBound case.
-  PeriodicHRectBound<2> b(arma::vec("100 100"));
-
-  b[0] = Range(0.0, 5.0);
-  b[1] = Range(2.0, 4.0);
-
-  // Inside the bound.
-  arma::vec point = "2.5 3.0";
-
-  BOOST_REQUIRE_SMALL(b.MinDistance(point), 1e-5);
-
-  // On the edge.
-  point = "5.0 4.0";
-
-  BOOST_REQUIRE_SMALL(b.MinDistance(point), 1e-5);
-
-  // And just a little outside the bound.
-  point = "6.0 5.0";
-
-  BOOST_REQUIRE_CLOSE(b.MinDistance(point), 2.0, 1e-5);
-
-  // Now we start to invoke the periodicity.  This point will "alias" to (-1,
-  // -1).
-  point = "99.0 99.0";
-
-  BOOST_REQUIRE_CLOSE(b.MinDistance(point), 10.0, 1e-5);
-
-  // We will perform several tests on a one-dimensional bound.
-  PeriodicHRectBound<2> a(arma::vec("5.0"));
-  point.set_size(1);
-
-  a[0] = Range(2.0, 4.0); // Entirely inside box.
-  point[0] = 7.5; // Inside first right image of the box.
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(point), 1e-5);
-
-  a[0] = Range(0.0, 5.0); // Fills box fully.
-  point[1] = 19.3; // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(point), 1e-5);
-
-  a[0] = Range(-10.0, 10.0); // Larger than the box.
-  point[0] = -500.0; // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(point), 1e-5);
-
-  a[0] = Range(-2.0, 1.0); // Crosses over an edge.
-  point[0] = 2.9; // The first right image of the bound starts at 3.0.
-
-  BOOST_REQUIRE_CLOSE(a.MinDistance(point), 0.01, 1e-5);
-
-  a[0] = Range(2.0, 4.0); // Inside box.
-  point[0] = 0.0; // Closest to the first left image of the bound.
-
-  BOOST_REQUIRE_CLOSE(a.MinDistance(point), 1.0, 1e-5);
-
-  a[0] = Range(0.0, 2.0); // On edge of box.
-  point[0] = 7.1; // 0.1 away from the first right image of the bound.
-
-  BOOST_REQUIRE_CLOSE(a.MinDistance(point), 0.01, 1e-5);
-
-  PeriodicHRectBound<2> d(arma::vec("0.0"));
-  d[0] = Range(-10.0, 10.0); // Box is of infinite size.
-  point[0] = 810.0; // 800 away from the only image of the box.
-
-  BOOST_REQUIRE_CLOSE(d.MinDistance(point), 640000, 1e-5);
-
-  PeriodicHRectBound<2> e(arma::vec("-5.0"));
-  e[0] = Range(2.0, 4.0); // Box size of -5 should function the same as 5.
-  point[0] = -10.8; // Should alias to 4.2.
-
-  BOOST_REQUIRE_CLOSE(e.MinDistance(point), 0.04, 1e-5);
-
-  // Switch our bound to a higher dimensionality.  This should ensure that the
-  // dimensions are independent like they should be.
-  PeriodicHRectBound<2> c(arma::vec("5.0 5.0 5.0 5.0 5.0 5.0 0.0 -5.0"));
-
-  c[0] = Range(2.0, 4.0); // Entirely inside box.
-  c[1] = Range(0.0, 5.0); // Fills box fully.
-  c[2] = Range(-10.0, 10.0); // Larger than the box.
-  c[3] = Range(-2.0, 1.0); // Crosses over an edge.
-  c[4] = Range(2.0, 4.0); // Inside box.
-  c[5] = Range(0.0, 2.0); // On edge of box.
-  c[6] = Range(-10.0, 10.0); // Box is of infinite size.
-  c[7] = Range(2.0, 4.0); // Box size of -5 should function the same as 5.
-
-  point.set_size(8);
-  point[0] = 7.5; // Inside first right image of the box.
-  point[1] = 19.3; // Inside the box, which covers everything.
-  point[2] = -500.0; // Inside the box, which covers everything.
-  point[3] = 2.9; // The first right image of the bound starts at 3.0.
-  point[4] = 0.0; // Closest to the first left image of the bound.
-  point[5] = 7.1; // 0.1 away from the first right image of the bound.
-  point[6] = 810.0; // 800 away from the only image of the box.
-  point[7] = -10.8; // Should alias to 4.2.
-
-  BOOST_REQUIRE_CLOSE(c.MinDistance(point), 640001.06, 1e-10);
-}
-
-/**
- * Correctly calculate the minimum distance between the bound and another bound in
- * periodic coordinates.  We have to account for the shifts necessary in
- * periodic coordinates too, so that makes testing this a little more difficult.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMinDistanceBound)
-{
-  // First, we'll start with a simple 2-dimensional case where the bounds are nonoverlapping,
-  // then one bound is on the edge of the other bound,
-  //  then overlapping, then one range entirely covering the other.  The box size will be large enough that this is basically the
-  // HRectBound case.
-  PeriodicHRectBound<2> b(arma::vec("100 100"));
-  PeriodicHRectBound<2> c(arma::vec("100 100"));
-
-  b[0] = Range(0.0, 5.0);
-  b[1] = Range(2.0, 4.0);
-
-  // Inside the bound.
-  c[0] = Range(7.0, 9.0);
-  c[1] = Range(10.0,12.0);
-
-
-  BOOST_REQUIRE_CLOSE(b.MinDistance(c), 40.0, 1e-5);
-
-  // On the edge.
-  c[0] = Range(5.0, 8.0);
-  c[1] = Range(4.0, 6.0);
-
-  BOOST_REQUIRE_SMALL(b.MinDistance(c), 1e-5);
-
-  // Overlapping the bound.
-  c[0] = Range(3.0, 6.0);
-  c[1] = Range(1.0, 3.0);
-
-  BOOST_REQUIRE_SMALL(b.MinDistance(c), 1e-5);
-
-  // One range entirely covering the other
-
-  c[0] = Range(0.0, 6.0);
-  c[1] = Range(1.0, 7.0);
-
-  BOOST_REQUIRE_SMALL(b.MinDistance(c), 1e-5);
-
-  // Now we start to invoke the periodicity.  These bounds "alias" to (-3.0,
-  // -1.0) and (5,0,6.0).
-
-  c[0] = Range(97.0, 99.0);
-  c[1] = Range(105.0, 106.0);
-
-  BOOST_REQUIRE_CLOSE(b.MinDistance(c), 2.0, 1e-5);
-
-  // We will perform several tests on a one-dimensional bound and smaller box size and mostly overlapping.
-  PeriodicHRectBound<2> a(arma::vec("5.0"));
-  PeriodicHRectBound<2> d(a);
-
-  a[0] = Range(2.0, 4.0); // Entirely inside box.
-  d[0] = Range(7.5, 10.0); // In the right image of the box, overlapping ranges.
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(d), 1e-5);
-
-  a[0] = Range(0.0, 5.0); // Fills box fully.
-  d[0] = Range(19.3, 21.0); // Two intervals inside the box, same as range of b[0].
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(d), 1e-5);
-
-  a[0] = Range(-10.0, 10.0); // Larger than the box.
-  d[0] = Range(-500.0, -498.0); // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(d), 1e-5);
-
-  a[0] = Range(-2.0, 1.0); // Crosses over an edge.
-  d[0] = Range(2.9, 5.1); // The first right image of the bound starts at 3.0. Overlapping
-
-  BOOST_REQUIRE_SMALL(a.MinDistance(d), 1e-5);
-
-  a[0] = Range(-1.0, 1.0); // Crosses over an edge.
-  d[0] = Range(11.9, 12.5); // The first right image of the bound starts at 4.0.
-  BOOST_REQUIRE_CLOSE(a.MinDistance(d), 0.81, 1e-5);
-
-  a[0] = Range(2.0, 3.0);
-  d[0] = Range(9.5, 11);
-  BOOST_REQUIRE_CLOSE(a.MinDistance(d), 1, 1e-5);
-
-}
-
-/**
- * Correctly calculate the maximum distance between the bound and a point in
- * periodic coordinates.  We have to account for the shifts necessary in
- * periodic coordinates too, so that makes testing this a little more difficult.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMaxDistancePoint)
-{
-  // First, we'll start with a simple 2-dimensional case where the point is
-  // inside the bound, then on the edge of the bound, then barely outside the
-  // bound.  The box size will be large enough that this is basically the
-  // HRectBound case.
-  PeriodicHRectBound<2> b(arma::vec("100 100"));
-
-  b[0] = Range(0.0, 5.0);
-  b[1] = Range(2.0, 4.0);
-
-  // Inside the bound.
-  arma::vec point = "2.5 3.0";
-
-  //BOOST_REQUIRE_CLOSE(b.MaxDistance(point), 7.25, 1e-5);
-
-  // On the edge.
-  point = "5.0 4.0";
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(point), 29.0, 1e-5);
-
-  // And just a little outside the bound.
-  point = "6.0 5.0";
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(point), 45.0, 1e-5);
-
-  // Now we start to invoke the periodicity.  This point will "alias" to (-1,
-  // -1).
-  point = "99.0 99.0";
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(point), 61.0, 1e-5);
-
-  // We will perform several tests on a one-dimensional bound and smaller box size.
-  PeriodicHRectBound<2> a(arma::vec("5.0"));
-  point.set_size(1);
-
-  a[0] = Range(2.0, 4.0); // Entirely inside box.
-  point[0] = 7.5; // Inside first right image of the box.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 2.25, 1e-5);
-
-  a[0] = Range(0.0, 5.0); // Fills box fully.
-  point[1] = 19.3; // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 18.49, 1e-5);
-
-  a[0] = Range(-10.0, 10.0); // Larger than the box.
-  point[0] = -500.0; // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 25.0, 1e-5);
-
-  a[0] = Range(-2.0, 1.0); // Crosses over an edge.
-  point[0] = 2.9; // The first right image of the bound starts at 3.0.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 8.41, 1e-5);
-
-  a[0] = Range(2.0, 4.0); // Inside box.
-  point[0] = 0.0; // Farthest from the first right image of the bound.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 25.0, 1e-5);
-
-  a[0] = Range(0.0, 2.0); // On edge of box.
-  point[0] = 7.1; // 2.1 away from the first left image of the bound.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(point), 4.41, 1e-5);
-
-  PeriodicHRectBound<2> d(arma::vec("0.0"));
-  d[0] = Range(-10.0, 10.0); // Box is of infinite size.
-  point[0] = 810.0; // 820 away from the only left image of the box.
-
-  BOOST_REQUIRE_CLOSE(d.MinDistance(point), 672400.0, 1e-5);
-
-  PeriodicHRectBound<2> e(arma::vec("-5.0"));
-  e[0] = Range(2.0, 4.0); // Box size of -5 should function the same as 5.
-  point[0] = -10.8; // Should alias to 4.2.
-
-  BOOST_REQUIRE_CLOSE(e.MaxDistance(point), 4.84, 1e-5);
-
-  // Switch our bound to a higher dimensionality.  This should ensure that the
-  // dimensions are independent like they should be.
-  PeriodicHRectBound<2> c(arma::vec("5.0 5.0 5.0 5.0 5.0 5.0 0.0 -5.0"));
-
-  c[0] = Range(2.0, 4.0); // Entirely inside box.
-  c[1] = Range(0.0, 5.0); // Fills box fully.
-  c[2] = Range(-10.0, 10.0); // Larger than the box.
-  c[3] = Range(-2.0, 1.0); // Crosses over an edge.
-  c[4] = Range(2.0, 4.0); // Inside box.
-  c[5] = Range(0.0, 2.0); // On edge of box.
-  c[6] = Range(-10.0, 10.0); // Box is of infinite size.
-  c[7] = Range(2.0, 4.0); // Box size of -5 should function the same as 5.
-
-  point.set_size(8);
-  point[0] = 7.5; // Inside first right image of the box.
-  point[1] = 19.3; // Inside the box, which covers everything.
-  point[2] = -500.0; // Inside the box, which covers everything.
-  point[3] = 2.9; // The first right image of the bound starts at 3.0.
-  point[4] = 0.0; // Closest to the first left image of the bound.
-  point[5] = 7.1; // 0.1 away from the first right image of the bound.
-  point[6] = 810.0; // 800 away from the only image of the box.
-  point[7] = -10.8; // Should alias to 4.2.
-
-  BOOST_REQUIRE_CLOSE(c.MaxDistance(point), 672630.65, 1e-10);
-}
-
-/**
- * Correctly calculate the maximum distance between the bound and another bound in
- * periodic coordinates.  We have to account for the shifts necessary in
- * periodic coordinates too, so that makes testing this a little more difficult.
- */
-BOOST_AUTO_TEST_CASE(PeriodicHRectBoundMaxDistanceBound)
-{
-  // First, we'll start with a simple 2-dimensional case where the bounds are nonoverlapping,
-  // then one bound is on the edge of the other bound,
-  //  then overlapping, then one range entirely covering the other.  The box size will be large enough that this is basically the
-  // HRectBound case.
-  PeriodicHRectBound<2> b(arma::vec("100 100"));
-  PeriodicHRectBound<2> c(b);
-
-  b[0] = Range(0.0, 5.0);
-  b[1] = Range(2.0, 4.0);
-
-  // Inside the bound.
-
-  c[0] = Range(7.0, 9.0);
-  c[1] = Range(10.0,12.0);
-
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(c), 181.0, 1e-5);
-
-  // On the edge.
-
-  c[0] = Range(5.0, 8.0);
-  c[1] = Range(4.0, 6.0);
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(c), 80.0, 1e-5);
-
-  // Overlapping the bound.
-
-  c[0] = Range(3.0, 6.0);
-  c[1] = Range(1.0, 3.0);
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(c), 45.0, 1e-5);
-
-  // One range entirely covering the other
-
-  c[0] = Range(0.0, 6.0);
-  c[1] = Range(1.0, 7.0);
-
-   BOOST_REQUIRE_CLOSE(b.MaxDistance(c), 61.0, 1e-5);
-
-  // Now we start to invoke the periodicity.  Thess bounds "alias" to (-3.0,
-  // -1.0) and (5,0,6.0).
-
-  c[0] = Range(97.0, 99.0);
-  c[1] = Range(105.0, 106.0);
-
-  BOOST_REQUIRE_CLOSE(b.MaxDistance(c), 80.0, 1e-5);
-
-  // We will perform several tests on a one-dimensional bound and smaller box size.
-  PeriodicHRectBound<2> a(arma::vec("5.0"));
-  PeriodicHRectBound<2> d(a);
-
-  a[0] = Range(2.0, 4.0); // Entirely inside box.
-  d[0] = Range(7.5, 10); // In the right image of the box, overlapping ranges.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(d), 9.0, 1e-5);
-
-  a[0] = Range(0.0, 5.0); // Fills box fully.
-  d[0] = Range(19.3, 21.0); // Two intervals inside the box, same as range of b[0].
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(d), 18.49, 1e-5);
-
-  a[0] = Range(-10.0, 10.0); // Larger than the box.
-  d[0] = Range(-500.0, -498.0); // Inside the box, which covers everything.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(d), 9.0, 1e-5);
-
-  a[0] = Range(-2.0, 1.0); // Crosses over an edge.
-  d[0] = Range(2.9, 5.1); // The first right image of the bound starts at 3.0.
-
-  BOOST_REQUIRE_CLOSE(a.MaxDistance(d), 24.01, 1e-5);
-}
-
-
-/**
  * It seems as though Bill has stumbled across a bug where
  * BinarySpaceTree<>::count() returns something different than
  * BinarySpaceTree<>::count_.  So, let's build a simple tree and make sure they




More information about the mlpack-svn mailing list