mlpack
Functions
sort_policy_test.cpp File Reference
#include <mlpack/core.hpp>
#include <mlpack/core/tree/binary_space_tree.hpp>
#include <mlpack/methods/neighbor_search/sort_policies/nearest_neighbor_sort.hpp>
#include <mlpack/methods/neighbor_search/sort_policies/furthest_neighbor_sort.hpp>
#include "catch.hpp"
Include dependency graph for sort_policy_test.cpp:

Functions

 TEST_CASE ("NnsBestDistance", "[SortPolicyTest]")
 Ensure the best distance for nearest neighbors is 0.
 
 TEST_CASE ("NnsWorstDistance", "[SortPolicyTest]")
 Ensure the worst distance for nearest neighbors is DBL_MAX.
 
 TEST_CASE ("NnsIsBetterStrict", "[SortPolicyTest]")
 Make sure the comparison works for values strictly less than the reference.
 
 TEST_CASE ("NnsIsBetterNotStrict", "[SortPolicyTest]")
 Warn in case the comparison is not strict.
 
 TEST_CASE ("NnsNodeToNodeDistance", "[SortPolicyTest]")
 Very simple sanity check to ensure that bounds are working alright. More...
 
 TEST_CASE ("NnsPointToNodeDistance", "[SortPolicyTest]")
 Another very simple sanity check for the point-to-node case, again in one dimension.
 
 TEST_CASE ("FnsBestDistance", "[SortPolicyTest]")
 Ensure the best distance for furthest neighbors is DBL_MAX.
 
 TEST_CASE ("FnsWorstDistance", "[SortPolicyTest]")
 Ensure the worst distance for furthest neighbors is 0.
 
 TEST_CASE ("FnsIsBetterStrict", "[SortPolicyTest]")
 Make sure the comparison works for values strictly less than the reference.
 
 TEST_CASE ("FnsIsBetterNotStrict", "[SortPolicyTest]")
 Warn in case the comparison is not strict.
 
 TEST_CASE ("FnsNodeToNodeDistance", "[SortPolicyTest]")
 Very simple sanity check to ensure that bounds are working alright. More...
 
 TEST_CASE ("FnsPointToNodeDistance", "[SortPolicyTest]")
 Another very simple sanity check for the point-to-node case, again in one dimension.
 

Detailed Description

Author
Ryan Curtin

Tests for each of the implementations of the SortPolicy class.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.

Function Documentation

◆ TEST_CASE() [1/2]

TEST_CASE ( "NnsNodeToNodeDistance"  ,
""  [SortPolicyTest] 
)

Very simple sanity check to ensure that bounds are working alright.

We will use a one-dimensional bound for simplicity.

◆ TEST_CASE() [2/2]

TEST_CASE ( "FnsNodeToNodeDistance"  ,
""  [SortPolicyTest] 
)

Very simple sanity check to ensure that bounds are working alright.

We will use a one-dimensional bound for simplicity.