[mlpack-svn] r12617 - mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu May 3 20:14:30 EDT 2012
Author: rcurtin
Date: 2012-05-03 20:14:29 -0400 (Thu, 03 May 2012)
New Revision: 12617
Modified:
mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp
mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort_impl.hpp
Log:
Update API to use TreeType::MinDistance() because other tree types may not have
a bound object.
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp 2012-05-04 00:13:55 UTC (rev 12616)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort_impl.hpp 2012-05-04 00:14:29 UTC (rev 12617)
@@ -18,7 +18,7 @@
{
// This is not implemented yet for the general case because the trees do not
// accept arbitrary distance metrics.
- return queryNode->Bound().MaxDistance(referenceNode->Bound());
+ return queryNode->MaxDistance(referenceNode);
}
template<typename TreeType>
@@ -28,7 +28,7 @@
{
// This is not implemented yet for the general case because the trees do not
// accept arbitrary distance metrics.
- return referenceNode->Bound().MaxDistance(point);
+ return referenceNode->MaxDistance(point);
}
}; // namespace neighbor
Modified: mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort_impl.hpp
===================================================================
--- mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort_impl.hpp 2012-05-04 00:13:55 UTC (rev 12616)
+++ mlpack/trunk/src/mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort_impl.hpp 2012-05-04 00:14:29 UTC (rev 12617)
@@ -18,7 +18,7 @@
{
// This is not implemented yet for the general case because the trees do not
// accept arbitrary distance metrics.
- return queryNode->Bound().MinDistance(referenceNode->Bound());
+ return queryNode->MinDistance(referenceNode);
}
template<typename TreeType>
@@ -28,7 +28,7 @@
{
// This is not implemented yet for the general case because the trees do not
// accept arbitrary distance metrics.
- return referenceNode->Bound().MinDistance(point);
+ return referenceNode->MinDistance(point);
}
}; // namespace neighbor
More information about the mlpack-svn
mailing list