mlpack
|
#include <mlpack/core.hpp>
#include <mlpack/core/tree/octree.hpp>
#include "catch.hpp"
#include "test_catch_tools.hpp"
#include "serialization.hpp"
Functions | |
TEST_CASE ("SimpleQuadtreeTest", "[OctreeTest]") | |
Build a quad-tree (2-d octree) on 4 points, and guarantee four points are created. | |
TEST_CASE ("OctreeMissingChildTest", "[OctreeTest]") | |
Build an octree on 3 points and make sure that only three children are created. | |
TEST_CASE ("EmptyOctreeTest", "[OctreeTest]") | |
Ensure that building an empty octree does not fail. | |
TEST_CASE ("MaxLeafSizeTest", "[OctreeTest]") | |
Ensure that maxLeafSize is respected. | |
TEST_CASE ("MappingsTest", "[OctreeTest]") | |
Check that the mappings given are correct. | |
TEST_CASE ("ReverseMappingsTest", "[OctreeTest]") | |
Check that the reverse mappings are correct too. | |
template<typename TreeType > | |
void | CheckOverlap (TreeType &node) |
Make sure no children at the same level are overlapping. | |
TEST_CASE ("OverlapTest", "[OctreeTest]") | |
template<typename TreeType > | |
void | CheckFurthestDistances (TreeType &node) |
Make sure no points are further than the furthest point distance, and that no descendants are further than the furthest descendant distance. | |
TEST_CASE ("FurthestDistanceTest", "[OctreeTest]") | |
template<typename TreeType > | |
void | CheckNumChildren (TreeType &node) |
The maximum number of children a node can have is limited by the dimensionality. More... | |
TEST_CASE ("MaxNumChildrenTest", "[OctreeTest]") | |
template<typename TreeType > | |
void | CheckSameNode (TreeType &node1, TreeType &node2) |
Test the copy constructor. | |
TEST_CASE ("CopyConstructorTest", "[OctreeTest]") | |
TEST_CASE ("OcTreeTestMoveConstructorTest", "[OctreeTest]") | |
Test the move constructor. | |
TEST_CASE ("OctreeSerializationTest", "[OctreeTest]") | |
Test serialization. | |
Test various properties of the Octree.
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.
void CheckNumChildren | ( | TreeType & | node | ) |
The maximum number of children a node can have is limited by the dimensionality.
So we test to make sure there are no cases where we have too many children.