From 1c8d0fbb3c33736f701aab655e740cc77eca7fa7 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sat, 15 Jun 2024 11:09:15 -0400 Subject: [PATCH] BallBound does not accept an instantiated metric so this test cannot work. (It didn't anyway.) --- src/mlpack/tests/tree_test.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/mlpack/tests/tree_test.cpp b/src/mlpack/tests/tree_test.cpp index d4aa0a21a5..7f38097f97 100644 --- a/src/mlpack/tests/tree_test.cpp +++ b/src/mlpack/tests/tree_test.cpp @@ -1655,31 +1655,6 @@ TEST_CASE("BallTreeTest", "[TreeTest]") } } -/** - * Ensure that we can build a ball tree with a custom instantiated distance - * type. - */ -TEST_CASE("MahalanobisBallTreeTest", "[TreeTest]") -{ - arma::mat dataset(10, 1000, arma::fill::randu); - arma::mat cov = arma::eye(10, 10); - cov(2, 2) = 2.0; // Just so it's not completely the identity matrix. - MahalanobisDistance<> m(std::move(cov)); - - typedef BallTree, EmptyStatistic, arma::mat> TreeType; - - TreeType tree(dataset); - - // As long as it built successfully, I am okay with that. - REQUIRE(tree.NumDescendants() == 1000); - - // Also test when we give oldFromNew, since this uses a different code path. - std::vector oldFromNew; - TreeType tree2(std::move(dataset), oldFromNew); - - REQUIRE(tree.NumDescendants() == 1000); -} - template void GenerateVectorOfTree(TreeType* node, size_t depth,