Update template class name

This commit is contained in:
Jackson Campolattaro 2020-07-21 17:14:41 -04:00
parent a041e69579
commit e7b75c9883
1 changed files with 24 additions and 24 deletions

View File

@ -23,8 +23,8 @@ namespace Octree {
namespace Walker { namespace Walker {
template<class Value> template<class Point_index>
const Node::Node <Value> *next_sibling(const Node::Node <Value> *n) { const Node::Node <Point_index> *next_sibling(const Node::Node <Point_index> *n) {
// Passing null returns the first node // Passing null returns the first node
if (nullptr == n) if (nullptr == n)
@ -45,8 +45,8 @@ const Node::Node <Value> *next_sibling(const Node::Node <Value> *n) {
return &((*n->parent())[index + 1]); return &((*n->parent())[index + 1]);
} }
template<class Value> template<class Point_index>
const Node::Node <Value> *next_sibling_up(const Node::Node <Value> *n) { const Node::Node <Point_index> *next_sibling_up(const Node::Node <Point_index> *n) {
if (!n) if (!n)
return nullptr; return nullptr;
@ -64,8 +64,8 @@ const Node::Node <Value> *next_sibling_up(const Node::Node <Value> *n) {
return nullptr; return nullptr;
} }
template<class Value> template<class Point_index>
const Node::Node <Value> *deepest_first_child(const Node::Node <Value> *n) { const Node::Node <Point_index> *deepest_first_child(const Node::Node <Point_index> *n) {
if (!n) if (!n)
return nullptr; return nullptr;
@ -86,24 +86,24 @@ struct Preorder {
/*! /*!
* \brief Retrieve the first node of a tree in a preorder traversal, given the root * \brief Retrieve the first node of a tree in a preorder traversal, given the root
* *
* \tparam Value * \tparam Point_index
* \param root * \param root
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *first(const Node::Node <Value> *root) const { const Node::Node <Point_index> *first(const Node::Node <Point_index> *root) const {
return root; return root;
} }
/*! /*!
* \brief Retrieve the next node of a tree in a preorder traversal, given the current one * \brief Retrieve the next node of a tree in a preorder traversal, given the current one
* *
* \tparam Value * \tparam Point_index
* \param n * \param n
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *next(const Node::Node <Value> *n) const { const Node::Node <Point_index> *next(const Node::Node <Point_index> *n) const {
if (n->is_leaf()) { if (n->is_leaf()) {
@ -133,12 +133,12 @@ struct Postorder {
/*! /*!
* \brief Retrieve the first node of a tree in a postorder traversal, given the root * \brief Retrieve the first node of a tree in a postorder traversal, given the root
* *
* \tparam Value * \tparam Point_index
* \param root * \param root
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *first(const Node::Node <Value> *root) const { const Node::Node <Point_index> *first(const Node::Node <Point_index> *root) const {
return deepest_first_child(root); return deepest_first_child(root);
} }
@ -146,12 +146,12 @@ struct Postorder {
/*! /*!
* \brief Retrieve the next node of a tree in a postorder traversal, given the current one * \brief Retrieve the next node of a tree in a postorder traversal, given the current one
* *
* \tparam Value * \tparam Point_index
* \param n * \param n
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *next(const Node::Node <Value> *n) const { const Node::Node <Point_index> *next(const Node::Node <Point_index> *n) const {
auto next = deepest_first_child(next_sibling(n)); auto next = deepest_first_child(next_sibling(n));
@ -170,12 +170,12 @@ struct Leaves {
/*! /*!
* \brief Retrieve the first node of a tree in a leaves-only traversal, given the root * \brief Retrieve the first node of a tree in a leaves-only traversal, given the root
* *
* \tparam Value * \tparam Point_index
* \param root * \param root
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *first(const Node::Node <Value> *root) const { const Node::Node <Point_index> *first(const Node::Node <Point_index> *root) const {
return deepest_first_child(root); return deepest_first_child(root);
} }
@ -183,12 +183,12 @@ struct Leaves {
/*! /*!
* \brief Retrieve the next node of a tree in a leaves-only traversal, given the current one * \brief Retrieve the next node of a tree in a leaves-only traversal, given the current one
* *
* \tparam Value * \tparam Point_index
* \param n * \param n
* \return * \return
*/ */
template<class Value> template<class Point_index>
const Node::Node <Value> *next(const Node::Node <Value> *n) const { const Node::Node <Point_index> *next(const Node::Node <Point_index> *n) const {
auto next = deepest_first_child(next_sibling(n)); auto next = deepest_first_child(next_sibling(n));