votca 2024.2-dev
Loading...
Searching...
No Matches
votca::xtp::huffmanTree< T > Class Template Reference

#include <huffmantree.h>

Collaboration diagram for votca::xtp::huffmanTree< T >:

Classes

struct  huffmanNode
 

Public Member Functions

void makeTree ()
 
T * findHoppingDestination (double p) const
 
void setEvents (std::vector< T > *v)
 

Private Member Functions

void addProbabilityFromRightSubtreeToLeftSubtree (huffmanNode< T > *n, double add)
 
void moveProbabilitiesFromRightSubtreesOneLevelUp (huffmanNode< T > *n)
 

Private Attributes

std::vector< huffmanNode< T > > htree
 
bool treeIsMade = false
 
double sum_of_values = 0.0
 
std::vector< T > * events = nullptr
 

Detailed Description

template<class T>
class votca::xtp::huffmanTree< T >

Definition at line 30 of file huffmantree.h.

Member Function Documentation

◆ addProbabilityFromRightSubtreeToLeftSubtree()

template<class T >
void votca::xtp::huffmanTree< T >::addProbabilityFromRightSubtreeToLeftSubtree ( huffmanNode< T > * n,
double add )
inlineprivate

Definition at line 143 of file huffmantree.h.

◆ findHoppingDestination()

template<class T >
T * votca::xtp::huffmanTree< T >::findHoppingDestination ( double p) const
inline

Definition at line 111 of file huffmantree.h.

◆ makeTree()

template<class T >
void votca::xtp::huffmanTree< T >::makeTree ( )
inline

Definition at line 33 of file huffmantree.h.

◆ moveProbabilitiesFromRightSubtreesOneLevelUp()

template<class T >
void votca::xtp::huffmanTree< T >::moveProbabilitiesFromRightSubtreesOneLevelUp ( huffmanNode< T > * n)
inlineprivate

Definition at line 189 of file huffmantree.h.

◆ setEvents()

template<class T >
void votca::xtp::huffmanTree< T >::setEvents ( std::vector< T > * v)
inline

Definition at line 128 of file huffmantree.h.

Member Data Documentation

◆ events

template<class T >
std::vector<T>* votca::xtp::huffmanTree< T >::events = nullptr
private

Definition at line 229 of file huffmantree.h.

◆ htree

template<class T >
std::vector<huffmanNode<T> > votca::xtp::huffmanTree< T >::htree
private

Definition at line 226 of file huffmantree.h.

◆ sum_of_values

template<class T >
double votca::xtp::huffmanTree< T >::sum_of_values = 0.0
private

Definition at line 228 of file huffmantree.h.

◆ treeIsMade

template<class T >
bool votca::xtp::huffmanTree< T >::treeIsMade = false
private

Definition at line 227 of file huffmantree.h.


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