[mlpack-svn] r13415 - mlpack/trunk/src/mlpack/tests
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Wed Aug 15 13:58:26 EDT 2012
Author: rcurtin
Date: 2012-08-15 13:58:25 -0400 (Wed, 15 Aug 2012)
New Revision: 13415
Modified:
mlpack/trunk/src/mlpack/tests/tree_test.cpp
Log:
A few more modifications to the tree test
Modified: mlpack/trunk/src/mlpack/tests/tree_test.cpp
===================================================================
--- mlpack/trunk/src/mlpack/tests/tree_test.cpp 2012-08-15 17:53:24 UTC (rev 13414)
+++ mlpack/trunk/src/mlpack/tests/tree_test.cpp 2012-08-15 17:58:25 UTC (rev 13415)
@@ -1583,10 +1583,10 @@
// The root point will be the first point, (0, 0).
CoverTree<> tree(data); // Expansion constant of 2.0.
- // The furthest point from the root will be (-5, -5), with a squared distance
- // of 50. This means the scale of the root node should be 6 (because 2^6 =
- // 64).
- BOOST_REQUIRE_EQUAL(tree.Scale(), 6);
+ // The furthest point from the root will be (-5, -5), with a distance of
+ // of sqrt(50). This means the scale of the root node should be 3 (because
+ // 2^3 = 8).
+ BOOST_REQUIRE_EQUAL(tree.Scale(), 3);
// Now loop through the tree and ensure that each leaf is only created once.
arma::vec counts;
@@ -1602,10 +1602,10 @@
// Each node must satisfy the covering principle (its children must be less
// than or equal to a certain distance apart).
- CheckCovering<CoverTree<>, LMetric<2> >(tree);
+ CheckCovering<CoverTree<>, LMetric<2, true> >(tree);
// Each node's children must be separated by at least a certain value.
- CheckSeparation<CoverTree<>, LMetric<2> >(tree, tree);
+ CheckSeparation<CoverTree<>, LMetric<2, true> >(tree, tree);
}
/**
@@ -1632,10 +1632,10 @@
// Each node must satisfy the covering principle (its children must be less
// than or equal to a certain distance apart).
- CheckCovering<CoverTree<>, LMetric<2> >(tree);
+ CheckCovering<CoverTree<>, LMetric<2, true> >(tree);
// Each node's children must be separated by at least a certain value.
- CheckSeparation<CoverTree<>, LMetric<2> >(tree, tree);
+ CheckSeparation<CoverTree<>, LMetric<2, true> >(tree, tree);
}
/**
More information about the mlpack-svn
mailing list