Frog Archiver 1.0
Frog Archiver is compression tools for any files you have.
Loading...
Searching...
No Matches
Tree Class Reference

Public Member Functions

const Treeoperator= (const Tree &)
 
void destroy (Node *N)
 
unsigned int get_freq () const
 
unsigned char get_char () const
 
void set_freq (unsigned int f)
 
void set_char (unsigned char c)
 
Node * get_root () const
 
Node * get_left () const
 
Node * get_right () const
 
void set_left (Node *N)
 
void set_right (Node *N)
 
bool operator== (const Tree &T) const
 
bool operator!= (const Tree &T) const
 
bool operator< (const Tree &T) const
 
bool operator<= (const Tree &T) const
 
bool operator> (const Tree &T) const
 
bool operator>= (const Tree &T) const
 
void huffman (Node *N, unsigned char c, string str, string &s) const
 
void huffman_list (Node *N, string str) const
 
bool get_huf_char (string str, unsigned char &c) const
 
string print_char (Node *N) const
 

Friends

void decoder ()
 
void encoder ()
 

Member Function Documentation

◆ get_huf_char()

bool Tree::get_huf_char ( string str,
unsigned char & c ) const
inline

Checking a character is in a tree. To get char equivalent of a Huffman string jika ada.

Parameters
strrespective tree
ca char to be finded
Returns
indicate found or not

◆ get_left()

Node * Tree::get_left ( ) const
inline

getter. Getting left of tree.

◆ get_right()

Node * Tree::get_right ( ) const
inline

Getter. Getting right of tree.

◆ get_root()

Node * Tree::get_root ( ) const
inline

Getter. Get root of tree.

◆ huffman()

void Tree::huffman ( Node * N,
unsigned char c,
string str,
string & s ) const
inline

get Huffman string of a char.

Parameters
Nhuffman list.
ca char will be placed
strkind of string to be replaced
soutput into a string that already placed

◆ huffman_list()

void Tree::huffman_list ( Node * N,
string str ) const
inline

Print menjadi huffman list. outputs the Huffman char-string pairs list

Parameters
Nhuffman list
strbased to be printed

◆ operator!=()

bool Tree::operator!= ( const Tree & T) const
inline

Override an operator of !=

Parameters
Tanother tree to be differentiate

◆ operator<()

bool Tree::operator< ( const Tree & T) const
inline

Override an operator of <

Parameters
Tanother tree to be differentiate

◆ operator<=()

bool Tree::operator<= ( const Tree & T) const
inline

Override an operator of <=

Parameters
Tanother tree to be differentiate

◆ operator==()

bool Tree::operator== ( const Tree & T) const
inline

Override an operator of ==

Parameters
Tanother tree to be differentiate

◆ operator>()

bool Tree::operator> ( const Tree & T) const
inline

Override an operator of >

Parameters
Tanother tree to be differentiate

◆ operator>=()

bool Tree::operator>= ( const Tree & T) const
inline

Override an operator of >=

Parameters
Tanother tree to be differentiate

◆ print_char()

string Tree::print_char ( Node * N) const
inline

Printing huffman tree

Parameters
Nmain root of huffman tree
Returns
string of tree structure

◆ set_left()

void Tree::set_left ( Node * N)
inline

Setter. Setting another pointer into left a tree

Parameters
Nanother tree

◆ set_right()

void Tree::set_right ( Node * N)
inline

Setter. Setting another pointer into right a tree

Parameters
Nanother tree

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