|
CPPX 2.1.0
A Modern C++ Utility Library
|
#include <cppx.h>
Public Member Functions | |
| BinaryTree ()=default | |
| BinaryTree (const BinaryTree &other) | |
| BinaryTree & | operator= (const BinaryTree &other) |
| BinaryTree (BinaryTree &&other) noexcept | |
| BinaryTree & | operator= (BinaryTree &&other) noexcept |
| virtual | ~BinaryTree () |
| Node< T > * | get_root () const |
| void | set_root (Node< T > *root) |
| bool | is_empty () const |
| int | size () const |
| void | print_preorder () const |
| void | print_inorder () const |
| void | print_postorder () const |
| void | print_levelorder () const |
| void | print_tree () const |
| void | dump_to_dot (const std::string &filename) const |
| Node< T > * | make_node (const T &val) |
| Node< T > * | make_node (const T &val, Node< T > *left, Node< T > *right) |
| void | set_left (Node< T > *parent, Node< T > *left_child) |
| void | set_right (Node< T > *parent, Node< T > *right_child) |
Protected Member Functions | |
| void | preorder (const Node< T > *node) const |
| void | inorder (const Node< T > *node) const |
| void | postorder (const Node< T > *node) const |
| void | levelorder (const Node< T > *node) const |
| int | compute_size (const Node< T > *node) const |
| void | print_tree_helper (const Node< T > *node, const std::string &prefix, bool is_left) const |
| void | dot_helper (const Node< T > *node, std::ostream &out, int &null_count) const |
| void | destroy_subtree (Node< T > *node) |
| Node< T > * | clone_subtree (const Node< T > *node) |
Protected Attributes | |
| Node< T > * | p_head = nullptr |
| NodePool< T > | m_pool |
|
default |
| stl_ext::BinaryTree< T >::BinaryTree | ( | const BinaryTree< T > & | other | ) |
Definition at line 82 of file binary_tree.tpp.
|
noexcept |
Definition at line 99 of file binary_tree.tpp.
|
virtual |
Definition at line 115 of file binary_tree.tpp.
Definition at line 25 of file binary_tree.tpp.
Definition at line 203 of file binary_tree.tpp.
Definition at line 7 of file binary_tree.tpp.
|
protected |
Definition at line 336 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::dump_to_dot | ( | const std::string & | filename | ) | const |
Definition at line 366 of file binary_tree.tpp.
Definition at line 223 of file binary_tree.tpp.
Definition at line 138 of file binary_tree.tpp.
| bool stl_ext::BinaryTree< T >::is_empty | ( | ) | const |
Definition at line 237 of file binary_tree.tpp.
Definition at line 185 of file binary_tree.tpp.
Definition at line 296 of file binary_tree.tpp.
| Node< T > * stl_ext::BinaryTree< T >::make_node | ( | const T & | val, |
| Node< T > * | left, | ||
| Node< T > * | right | ||
| ) |
Definition at line 301 of file binary_tree.tpp.
|
noexcept |
Definition at line 104 of file binary_tree.tpp.
| BinaryTree< T > & stl_ext::BinaryTree< T >::operator= | ( | const BinaryTree< T > & | other | ) |
Definition at line 87 of file binary_tree.tpp.
Definition at line 156 of file binary_tree.tpp.
Definition at line 120 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_inorder | ( | ) | const |
Definition at line 280 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_levelorder | ( | ) | const |
Definition at line 290 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_postorder | ( | ) | const |
Definition at line 285 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_preorder | ( | ) | const |
Definition at line 275 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_tree | ( | ) | const |
Definition at line 319 of file binary_tree.tpp.
|
protected |
Definition at line 307 of file binary_tree.tpp.
Definition at line 247 of file binary_tree.tpp.
Definition at line 261 of file binary_tree.tpp.
Definition at line 228 of file binary_tree.tpp.
| int stl_ext::BinaryTree< T >::size | ( | ) | const |
Definition at line 242 of file binary_tree.tpp.