Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
test_tree_node.C File Reference
#include <iostream>
#include <string>
#include <stdexcept>
#include <ah-errors.H>
#include <tpl_tree_node.H>
#include <tpl_dynArray.H>
#include <cassert>
Include dependency graph for test_tree_node.C:

Go to the source code of this file.

Typedefs

using Node = Tree_Node< string >
 

Functions

static void print_node (Node *node, int level, int index)
 
static Node * append_child (Node *parent, const string &name)
 
static void draw_children (Node *node, const string &prefix)
 
static void draw_tree (Node *root)
 
static void print_dewey_view (Node *node, const string &dewey, size_t level)
 Print every node with its Dewey number and depth indentation.
 
int main ()
 

Typedef Documentation

◆ Node

using Node = Tree_Node<string>

Definition at line 43 of file test_tree_node.C.

Function Documentation

◆ append_child()

static Node * append_child ( Node *  parent,
const string &  name 
)
static

Definition at line 50 of file test_tree_node.C.

Referenced by main().

◆ draw_children()

static void draw_children ( Node *  node,
const string &  prefix 
)
static

Definition at line 57 of file test_tree_node.C.

References draw_children(), and Aleph::prefix().

Referenced by draw_children(), and draw_tree().

◆ draw_tree()

static void draw_tree ( Node *  root)
static

Definition at line 68 of file test_tree_node.C.

References draw_children(), and root().

Referenced by main().

◆ main()

◆ print_dewey_view()

static void print_dewey_view ( Node *  node,
const string &  dewey,
size_t  level 
)
static

Print every node with its Dewey number and depth indentation.

Parameters
[in]nodecurrent node.
[in]deweyDewey number of node.
[in]leveldepth of node.

Definition at line 80 of file test_tree_node.C.

References Aleph::blossom_maximum_cardinality_matching(), print_dewey_view(), and Aleph::to_string().

Referenced by main(), and print_dewey_view().

◆ print_node()

static void print_node ( Node *  node,
int  level,
int  index 
)
static

Definition at line 45 of file test_tree_node.C.

References Aleph::Tree_Node< T >::get_data().

Referenced by main().