DMRITool  v0.1.1-139-g860d86b4
Diffusion MRI Tool
Public Member Functions | Private Member Functions | Private Attributes | List of all members
spams::BinaryHeap< T > Class Template Reference

#include <list.h>

Detailed Description

template<typename T>
class spams::BinaryHeap< T >

Definition at line 149 of file list.h.

Public Member Functions

 BinaryHeap (int size)
 
void decrease_key (const int node, const T val)
 
void delete_min ()
 
void find_min (int &node, T &val) const
 
void insert (const int node, const T val)
 
bool is_empty () const
 
void print () const
 
 ~BinaryHeap ()
 

Private Member Functions

void siftdown (const int pos)
 
void siftup (const int pos)
 
void swapping (int &pos1, int &pos2)
 

Private Attributes

int * _id
 
int _last
 
int * _position
 
int _size
 
T * _values
 

Constructor & Destructor Documentation

template<typename T>
spams::BinaryHeap< T >::BinaryHeap ( int  size)
inline

Definition at line 151 of file list.h.

References _size.

template<typename T>
spams::BinaryHeap< T >::~BinaryHeap ( )
inline

Definition at line 152 of file list.h.

Member Function Documentation

template<typename T>
void spams::BinaryHeap< T >::decrease_key ( const int  node,
const T  val 
)
inline

Definition at line 171 of file list.h.

Referenced by spams::MinCostFlow< Int >::price_refine(), and spams::MinCostFlow< Int >::price_update().

+ Here is the caller graph for this function:

template<typename T>
void spams::BinaryHeap< T >::delete_min ( )
inline

Definition at line 165 of file list.h.

Referenced by spams::MinCostFlow< Int >::price_refine(), spams::MinCostFlow< Int >::price_update(), and spams::MinCostFlow< Int >::st_flow_decomposition_dag().

+ Here is the caller graph for this function:

template<typename T>
void spams::BinaryHeap< T >::find_min ( int &  node,
T &  val 
) const
inline

Definition at line 155 of file list.h.

Referenced by spams::MinCostFlow< Int >::price_refine(), spams::MinCostFlow< Int >::price_update(), and spams::MinCostFlow< Int >::st_flow_decomposition_dag().

+ Here is the caller graph for this function:

template<typename T>
void spams::BinaryHeap< T >::insert ( const int  node,
const T  val 
)
inline

Definition at line 157 of file list.h.

References _size.

Referenced by spams::MinCostFlow< Int >::price_refine(), spams::MinCostFlow< Int >::price_update(), and spams::MinCostFlow< Int >::st_flow_decomposition_dag().

+ Here is the caller graph for this function:

template<typename T>
bool spams::BinaryHeap< T >::is_empty ( ) const
inline

Definition at line 154 of file list.h.

Referenced by spams::MinCostFlow< Int >::price_refine(), spams::MinCostFlow< Int >::price_update(), and spams::MinCostFlow< Int >::st_flow_decomposition_dag().

+ Here is the caller graph for this function:

template<typename T>
void spams::BinaryHeap< T >::print ( ) const
inline

Definition at line 176 of file list.h.

template<typename T>
void spams::BinaryHeap< T >::siftdown ( const int  pos)
inlineprivate

Definition at line 196 of file list.h.

template<typename T>
void spams::BinaryHeap< T >::siftup ( const int  pos)
inlineprivate

Definition at line 188 of file list.h.

template<typename T>
void spams::BinaryHeap< T >::swapping ( int &  pos1,
int &  pos2 
)
inlineprivate

Definition at line 229 of file list.h.

Member Data Documentation

template<typename T>
int* spams::BinaryHeap< T >::_id
private

Definition at line 236 of file list.h.

template<typename T>
int spams::BinaryHeap< T >::_last
private

Definition at line 238 of file list.h.

template<typename T>
int* spams::BinaryHeap< T >::_position
private

Definition at line 237 of file list.h.

template<typename T>
int spams::BinaryHeap< T >::_size
private

Definition at line 239 of file list.h.

template<typename T>
T* spams::BinaryHeap< T >::_values
private

Definition at line 233 of file list.h.


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