GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
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

◆ ReplacementHeap()

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.

◆ ~ReplacementHeap()

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

Definition at line 176 of file replacementHeap.h.

References HeapElement< T >::run.

Member Function Documentation

◆ addRun()

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.

◆ buildheap()

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

Definition at line 368 of file replacementHeap.h.

◆ deleteRun()

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

Definition at line 233 of file replacementHeap.h.

References assert, RHEAP_DEBUG, and HeapElement< T >::run.

◆ empty()

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

Definition at line 118 of file replacementHeap.h.

◆ extract_min()

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

◆ heapify()

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

Definition at line 336 of file replacementHeap.h.

◆ init()

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

◆ print()

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

Definition at line 127 of file replacementHeap.h.


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