Skip to content

Commit

Permalink
Add doxygen comment stubs to walkers
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonCampolattaro committed Jul 10, 2020
1 parent 163388a commit d1ec728
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
1 change: 0 additions & 1 deletion Octree/include/CGAL/Octree/Split_criterion.h
Expand Up @@ -8,7 +8,6 @@ namespace CGAL {

namespace Octree {


struct Split_to_bucket_size {

std::size_t m_bucket_size;
Expand Down
51 changes: 51 additions & 0 deletions Octree/include/CGAL/Octree/Walker_criterion.h
Expand Up @@ -67,13 +67,30 @@ const Node::Node <Value> *deepest_first_child(const Node::Node <Value> *n) {
}


/*!
* \brief Walker for preorder traversal
*/
struct Preorder {

/*!
* \brief Retrieve the first node of a tree in a preorder traversal, given the root
*
* \tparam Value
* \param root
* \return
*/
template<class Value>
const Node::Node <Value> *first(const Node::Node <Value> *root) const {
return root;
}

/*!
* \brief Retrieve the next node of a tree in a preorder traversal, given the current one
*
* \tparam Value
* \param n
* \return
*/
template<class Value>
const Node::Node <Value> *next(const Node::Node <Value> *n) const {

Expand All @@ -97,14 +114,31 @@ struct Preorder {
}
};

/*!
* \brief Walker for leaves-only traversal
*/
struct Postorder {

/*!
* \brief Retrieve the first node of a tree in a postorder traversal, given the root
*
* \tparam Value
* \param root
* \return
*/
template<class Value>
const Node::Node <Value> *first(const Node::Node <Value> *root) const {

return deepest_first_child(root);
}

/*!
* \brief Retrieve the next node of a tree in a postorder traversal, given the current one
*
* \tparam Value
* \param n
* \return
*/
template<class Value>
const Node::Node <Value> *next(const Node::Node <Value> *n) const {

Expand All @@ -117,14 +151,31 @@ struct Postorder {
}
};

/*!
* \brief Walker for leaves-only traversal
*/
struct Leaves {

/*!
* \brief Retrieve the first node of a tree in a leaves-only traversal, given the root
*
* \tparam Value
* \param root
* \return
*/
template<class Value>
const Node::Node <Value> *first(const Node::Node <Value> *root) const {

return deepest_first_child(root);
}

/*!
* \brief Retrieve the next node of a tree in a leaves-only traversal, given the current one
*
* \tparam Value
* \param n
* \return
*/
template<class Value>
const Node::Node <Value> *next(const Node::Node <Value> *n) const {

Expand Down

0 comments on commit d1ec728

Please sign in to comment.