diff --git a/Orthtree/doc/Orthtree/Orthtree.txt b/Orthtree/doc/Orthtree/Orthtree.txt index d942785e37c..002a5d67c1b 100644 --- a/Orthtree/doc/Orthtree/Orthtree.txt +++ b/Orthtree/doc/Orthtree/Orthtree.txt @@ -40,7 +40,7 @@ subdivide space further. This method uses a split predicate which takes a node as input and returns `true` is this node should be split, `false` otherwise: this enables users to choose on what criterion should the orthtree be refined. Predefined predicates are -provided such as [Max_depth](@ref CGAL::Orthtrees::Split_predicate::Max_depth) or [Bucket_size](@ref CGAL::Orthtrees::Split_predicate::Bucket_size). +provided such as [Maximum_depth](@ref CGAL::Orthtrees::Split_predicate::Maximum_depth) or [Maximum_number_of_inliers](@ref CGAL::Orthtrees::Split_predicate::Maximum_number_of_inliers). \subsection Section_Orthtree_Orthtree_Point_Vector Building an Orthtree @@ -82,7 +82,7 @@ map type and object. This example illustrates how to create an %octree from a `P It also shows a more explicit way of setting the split predicate when refining the tree. An octree is constructed from the point set and its map. -The tree is refined with a max depth (deepest node allowed) of 10, +The tree is refined with a maximum depth (deepest node allowed) of 10, and a bucket size (maximum number of points contained by a single node) of 20. The tree is then printed to the standard output. diff --git a/Orthtree/doc/Orthtree/PackageDescription.txt b/Orthtree/doc/Orthtree/PackageDescription.txt index a4f657b6007..c1aa6268a31 100644 --- a/Orthtree/doc/Orthtree/PackageDescription.txt +++ b/Orthtree/doc/Orthtree/PackageDescription.txt @@ -52,9 +52,9 @@ - `CGAL::Orthtree_traits_d` \cgalCRPSection{Split Predicates} -- `CGAL::Orthtrees::Split_predicate::Bucket_size` -- `CGAL::Orthtrees::Split_predicate::Max_depth` -- `CGAL::Orthtrees::Split_predicate::Max_depth_or_bucket_size` +- `CGAL::Orthtrees::Split_predicate::Maximum_number_of_inliers` +- `CGAL::Orthtrees::Split_predicate::Maximum_depth` +- `CGAL::Orthtrees::Split_predicate::Maximum_depth_and_maximum_number_of_inliers` \cgalCRPSection{%Traversal} - `CGAL::Orthtrees::Traversal::Preorder` diff --git a/Orthtree/examples/Orthtree/Octree_build_from_Point_set.cpp b/Orthtree/examples/Orthtree/Octree_build_from_Point_set.cpp index 7a535db6e77..7b266a659a6 100644 --- a/Orthtree/examples/Orthtree/Octree_build_from_Point_set.cpp +++ b/Orthtree/examples/Orthtree/Octree_build_from_Point_set.cpp @@ -33,7 +33,7 @@ int main(int argc, char **argv) { Octree octree(points, points.point_map()); // Build the octree with a small bucket size, using a more verbose method - octree.refine(CGAL::Orthtrees::Split_predicate::Max_depth_or_bucket_size(5, 10)); + octree.refine(CGAL::Orthtrees::Split_predicate::Maximum_depth_and_maximum_number_of_inliers(5, 10)); // Print out the tree std::cout << octree; diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index ca7cfb954eb..220fb2591c7 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -286,18 +286,19 @@ public: /*! - \brief convenience overload that refines an orthtree using a max - depth and max number of points in a node as split predicate. + \brief convenience overload that refines an orthtree using a + maximum depth and maximum number of points in a node as split + predicate. This is equivalent to calling - `refine(Split_predicate::Max_depth_or_bucket_size(max_depth, + `refine(Split_predicate::Maximum_depth_and_maximum_number_of_inliers(min_depth, bucket_size))` \param max_depth deepest a tree is allowed to be (nodes at this depth will not be split). \param bucket_size maximum points a node is allowed to contain. */ void refine(size_t max_depth = 10, size_t bucket_size = 20) { - refine(Orthtrees::Split_predicate::Max_depth_or_bucket_size(max_depth, bucket_size)); + refine(Orthtrees::Split_predicate::Maximum_depth_and_maximum_number_of_inliers(max_depth, bucket_size)); } /*! diff --git a/Orthtree/include/CGAL/Orthtree/Split_predicate.h b/Orthtree/include/CGAL/Orthtree/Split_predicate.h index a1b6ec60f54..c09c9fced6e 100644 --- a/Orthtree/include/CGAL/Orthtree/Split_predicate.h +++ b/Orthtree/include/CGAL/Orthtree/Split_predicate.h @@ -24,17 +24,17 @@ namespace Split_predicate { /*! \ingroup PkgOrthtreeSplitPredicates - \brief predicate to split nodes of an orthtree when they contain more than a certain number of items + \brief bucket size predicate that splits a node if it contains more than a certain number of items. */ -class Bucket_size { +class Maximum_number_of_inliers { std::size_t m_bucket_size; public: /*! - \brief creates a bucket size predicate. + \brief creates a predicate based on the number of inliers (bucket size). */ - Bucket_size(std::size_t bucket_size) : + Maximum_number_of_inliers(std::size_t bucket_size) : m_bucket_size(bucket_size) {} /*! @@ -48,18 +48,18 @@ public: /*! \ingroup PkgOrthtreeSplitPredicates - \brief predicate to split nodes of an orthtree when they are less than a certain depth. + \brief predicate that splits a node if its depth is lower than a certain limit. */ -class Max_depth { +class Maximum_depth { std::size_t m_max_depth; public: /*! - \brief creates a max depth predicate. + \brief creates a maximum depth predicate. */ - Max_depth(std::size_t max_depth) : m_max_depth(max_depth) {} + Maximum_depth(std::size_t max_depth) : m_max_depth(max_depth) {} /*! \brief returns `true` if `n` should be splitted, `false` otherwise. @@ -72,18 +72,21 @@ public: /*! \ingroup PkgOrthtreeSplitPredicates - \brief predicate to split nodes when they are less than a depth and they contain more than a number of items. + + \brief predicate that splits a node if it contains more than a + certain number of items and if its depth is lower than a certain + limit. */ -class Max_depth_or_bucket_size { +class Maximum_depth_and_maximum_number_of_inliers { std::size_t m_max_depth, m_bucket_size; public: /*! - \brief creates a predicate using max depth or bucket size. + \brief creates a predicate using minimum depth or bucket size. */ - Max_depth_or_bucket_size(std::size_t max_depth, std::size_t bucket_size) : + Maximum_depth_and_maximum_number_of_inliers(std::size_t max_depth, std::size_t bucket_size) : m_max_depth(max_depth), m_bucket_size(bucket_size) {} /*!