Board 0.9.6
Public Member Functions | Public Attributes | List of all members
Node Struct Reference

Public Member Functions

 Node (const std::string &symbol, double probability, Node *left=nullptr, Node *right=nullptr)
 
 ~Node ()
 
int height () const
 

Public Attributes

std::string symbol
 
double probability
 
std::string codeword
 
Nodeleft
 
Noderight
 

Detailed Description

Examples
examples/Huffman.cpp.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( const std::string &  symbol,
double  probability,
Node left = nullptr,
Node right = nullptr 
)
inline

◆ ~Node()

Node::~Node ( )
inline
Examples
examples/Huffman.cpp.

References left, and right.

Member Function Documentation

◆ height()

int Node::height ( ) const
inline
Examples
examples/Huffman.cpp.

References height(), left, and right.

Referenced by height(), and NodeGreaterThan::operator()().

Member Data Documentation

◆ codeword

std::string Node::codeword
Examples
examples/Huffman.cpp.

Referenced by fill_codeword(), and LeaveBox().

◆ left

Node* Node::left

◆ probability

double Node::probability

◆ right

Node* Node::right

◆ symbol

std::string Node::symbol

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