GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73682
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ReplacementHeap< T, Compare > Class Template Reference

#include <replacementHeap.h>

Public Member Functions

 ReplacementHeap (size_t arity, queue< char * > *runList)
 
 ~ReplacementHeap ()
 
int empty () const
 
extract_min ()
 
ostream & print (ostream &s) const
 

Protected Member Functions

void heapify (size_t i)
 
void buildheap ()
 
void init ()
 
void addRun (AMI_STREAM< T > *run)
 
void deleteRun (size_t i)
 

Detailed Description

template<class T, class Compare>
class ReplacementHeap< T, Compare >

Definition at line 79 of file replacementHeap.h.

Constructor & Destructor Documentation

template<class T , class Compare >
ReplacementHeap< T, Compare >::ReplacementHeap ( size_t  arity,
queue< char * > *  runList 
)

Definition at line 150 of file replacementHeap.h.

References assert, queue< T >::dequeue(), init(), name, NULL, and RHEAP_DEBUG.

template<class T , class Compare >
ReplacementHeap< T, Compare >::~ReplacementHeap< T, Compare > ( )

Definition at line 176 of file replacementHeap.h.

Member Function Documentation

template<class T , class Compare >
void ReplacementHeap< T, Compare >::addRun ( AMI_STREAM< T > *  run)
protected

Definition at line 196 of file replacementHeap.h.

References assert, AMI_STREAM< T >::name(), r, and RHEAP_DEBUG.

template<class T , class Compare >
void ReplacementHeap< T, Compare >::buildheap ( )
protected

Definition at line 368 of file replacementHeap.h.

References RHEAP_DEBUG.

template<class T , class Compare >
void ReplacementHeap< T, Compare >::deleteRun ( size_t  i)
protected

Definition at line 233 of file replacementHeap.h.

References assert, and RHEAP_DEBUG.

template<class T , class Compare >
int ReplacementHeap< T, Compare >::empty ( void  ) const
inline

Definition at line 118 of file replacementHeap.h.

template<class T , class Compare >
T ReplacementHeap< T, Compare >::extract_min ( )

Definition at line 383 of file replacementHeap.h.

References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, err(), min, and RHEAP_DEBUG.

template<class T , class Compare >
void ReplacementHeap< T, Compare >::heapify ( size_t  i)
protected

Definition at line 336 of file replacementHeap.h.

References assert.

template<class T , class Compare >
void ReplacementHeap< T, Compare >::init ( )
protected

Definition at line 264 of file replacementHeap.h.

References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, err(), and RHEAP_DEBUG.

template<class T , class Compare >
ostream& ReplacementHeap< T, Compare >::print ( ostream &  s) const
inline

Definition at line 127 of file replacementHeap.h.

References assert.


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