AlgoPlus v0.1.0
Loading...
Searching...
No Matches
ttf_tree< T > Class Template Reference

234-tree class More...

#include <234_tree.h>

Public Member Functions

 ttf_tree (const std::vector< T > &elements={})
 default constructor of 234-tree class
 
bool search (const T &key) const
 search function
 
void insert (const T &key)
 insert function
 
std::vector< std::vector< std::vector< T > > > level_order () const
 level_order function
 

Friends

std::ostream & operator<< (std::ostream &out, ttf_tree< T > &t)
 operator << for ttf_tree class
 

Detailed Description

template<typename T>
class ttf_tree< T >

234-tree class

Constructor & Destructor Documentation

◆ ttf_tree()

template<typename T>
ttf_tree< T >::ttf_tree ( const std::vector< T > & elements = {})
inlineexplicit

default constructor of 234-tree class

Parameters
elementsby default empty, if you want to pass elements all in one to the tree

Member Function Documentation

◆ insert()

template<typename T>
void ttf_tree< T >::insert ( const T & key)
inline

insert function

Parameters
keythet key we want to insert

◆ level_order()

template<typename T>
std::vector< std::vector< std::vector< T > > > ttf_tree< T >::level_order ( ) const
inline

level_order function

Returns
vector<vector<vector<T> > > the level order of the 234-tree in a 3d array

◆ search()

template<typename T>
bool ttf_tree< T >::search ( const T & key) const
inline

search function

Parameters
keythe element we want to search
Returns
true if key exists in the tree
false otherwise

The documentation for this class was generated from the following file: