try to improve phrasing

This commit is contained in:
Sébastien Loriot 2024-02-29 19:12:29 +01:00
parent c622af1430
commit 3da1087bfe
1 changed files with 10 additions and 10 deletions

View File

@ -284,11 +284,11 @@ purposes.
For nontrivial point counts, the naive approach's calculation time dwarfs that of either the %orthtree or kd-tree.
\section Section_Orthtree_Migration Migration from CGAL 5.6
\section Section_Orthtree_Migration Migrating Code Written Before Release 6.0
The orthtree traits changed to allow for custom data stored per node in the orthtree. To migrate existing code from CGAL 5.6 Orthtree_traits_point can be used for a point-based orthtrees. The aliases `CGAL::Quadtree` and `CGAL::Octree` have been extended by a boolean template parameter to allow for non-cubic cells, which is the default. The data is passed via the traits class and no longer directly into the orthtree.
The orthtree package changed to allow for custom data stored per node in the orthtree. To migrate existing code written before \cgal 6.0 `Orthtree_traits_point` can be used for a point-based orthtrees. The aliases `CGAL::Quadtree` and `CGAL::Octree` have been extended by a boolean template parameter to allow for non-cubic cells, which is the default. The data is passed via the traits class and no longer directly to the orthtree.
CGAL 5.6 code to declare and define an Octree with cubic cells:
Former code to declare and define an Octree with cubic cells was as follows:
\code{.cpp}
typedef CGAL::Point_set_3<Kernel::Point_3> Point_set;
typedef CGAL::Octree<Kernel, Point_set, Point_map> Octree;
@ -296,7 +296,7 @@ typedef CGAL::Octree<Kernel, Point_set, Point_map> Octree;
Octree octree(points, points.point_map());
\endcode
CGAL 6.0 code with identical behavior:
\cgal 6.0 code with identical behavior is now:
\code{.cpp}
typedef CGAL::Point_set_3<Kernel::Point_3> Point_set;
typedef CGAL::Octree<Kernel, Point_set, Point_map, false> Octree;
@ -304,9 +304,9 @@ typedef CGAL::Octree<Kernel, Point_set, Point_map, false> Octree;
Octree octree({points, points.point_map()});
\endcode
The node class does not exist anymore and has been replaced by the lightweight type Node_index. All information formerly contained in the node class is now accessible via the Orthtree interface and stored using the new property maps.
The node class does not exist anymore and has been replaced by the lightweight type `Node_index`. All information formerly contained in the node class is now accessible via the `Orthtree` interface.
CGAL 5.6 exemplary node access:
Former node access was as follows:
\code{.cpp}
Orthtree::Node root = orthtree.root();
Orthtree::Node child = root[0];
@ -316,7 +316,7 @@ for (Orthtree::Node::const_iterator it = child.begin(); it != child.end(); it++)
...
\endcode
CGAL 6.0 exemplary node access:
\cgal 6.0 node access is now:
\code{.cpp}
Orthtree::Node_index root = orthtree.root();
Orthtree::Node_index child = orthtree.child(root, 0);
@ -328,15 +328,15 @@ for (const Orthtree::Traits::Node_data_element &idx : orthtree.data(child))
The nearest neighbor search behaves as before, however, the output iterator will be required to store `CollectionPartitioningOrthtreeTraits::Node_data_element`. This may be the actual point or, e.g., in case a `Point_set_3` is used, an index which requires the use of a point map to retrieve the point.
The provided traversals, i.e., CGAL::Orthtrees::Leaves_traversal, CGAL::Orthtrees::Preorder_traversal, CGAL::Orthtrees::Postorder_traversal, require the orthtree as template parameter now.
The provided traversals, i.e., `CGAL::Orthtrees::Leaves_traversal`, `CGAL::Orthtrees::Preorder_traversal`, `CGAL::Orthtrees::Postorder_traversal`, require the orthtree as template parameter now.
CGAL 5.6 traversal use:
Former traversal use was as follows:
\code{.cpp}
for (Orthtree::Node node : orthtree.traverse<CGAL::Orthtrees::Leaves_traversal>())
...
\endcode
CGAL 6.0 traversal use:
\cgal 6.0 traversal use is now:
\code{.cpp}
for (Orthtree::Node_index node : orthtree.traverse<CGAL::Orthtrees::Leaves_traversal<Orthtree>>())
...