klee
klee::DiscretePDF< T, Comparator > Class Template Reference

#include <DiscretePDF.h>

Public Member Functions

 DiscretePDF ()
 
 ~DiscretePDF ()
 
bool empty () const
 
void insert (T item, weight_type weight)
 
void update (T item, weight_type newWeight)
 
void remove (T item)
 
bool inTree (T item)
 
weight_type getWeight (T item)
 
choose (double p)
 

Private Types

typedef double weight_type
 

Private Member Functions

Node ** lookup (T item, Node **parent_out)
 
void split (Node *node)
 
void rotate (Node *node)
 
void lengthen (Node *node)
 
void propagateSumsUp (Node *n)
 

Private Attributes

Node * m_root
 

Detailed Description

template<class T, class Comparator = std::less<T>>
class klee::DiscretePDF< T, Comparator >

Definition at line 17 of file DiscretePDF.h.

Member Typedef Documentation

◆ weight_type

template<class T , class Comparator = std::less<T>>
typedef double klee::DiscretePDF< T, Comparator >::weight_type
private

Definition at line 21 of file DiscretePDF.h.

Constructor & Destructor Documentation

◆ DiscretePDF()

template<class T , class Comparator = std::less<T>>
klee::DiscretePDF< T, Comparator >::DiscretePDF ( )

◆ ~DiscretePDF()

template<class T , class Comparator = std::less<T>>
klee::DiscretePDF< T, Comparator >::~DiscretePDF ( )

Member Function Documentation

◆ choose()

template<class T , class Comparator = std::less<T>>
T klee::DiscretePDF< T, Comparator >::choose ( double  p)

◆ empty()

template<class T , class Comparator = std::less<T>>
bool klee::DiscretePDF< T, Comparator >::empty ( ) const

◆ getWeight()

template<class T , class Comparator = std::less<T>>
weight_type klee::DiscretePDF< T, Comparator >::getWeight ( item)

◆ insert()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::insert ( item,
weight_type  weight 
)

◆ inTree()

template<class T , class Comparator = std::less<T>>
bool klee::DiscretePDF< T, Comparator >::inTree ( item)

◆ lengthen()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::lengthen ( Node *  node)
private

◆ lookup()

template<class T , class Comparator = std::less<T>>
Node ** klee::DiscretePDF< T, Comparator >::lookup ( item,
Node **  parent_out 
)
private

◆ propagateSumsUp()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::propagateSumsUp ( Node *  n)
private

◆ remove()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::remove ( item)

◆ rotate()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::rotate ( Node *  node)
private

◆ split()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::split ( Node *  node)
private

◆ update()

template<class T , class Comparator = std::less<T>>
void klee::DiscretePDF< T, Comparator >::update ( item,
weight_type  newWeight 
)

Member Data Documentation

◆ m_root

template<class T , class Comparator = std::less<T>>
Node* klee::DiscretePDF< T, Comparator >::m_root
private

Definition at line 41 of file DiscretePDF.h.


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