GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
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 72 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 136 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

Definition at line 162 of file replacementHeap.h.

Member Function Documentation

◆ addRun()

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

Definition at line 180 of file replacementHeap.h.

References assert, r, and RHEAP_DEBUG.

◆ buildheap()

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

Definition at line 348 of file replacementHeap.h.

◆ deleteRun()

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

Definition at line 214 of file replacementHeap.h.

References assert, and RHEAP_DEBUG.

◆ empty()

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

Definition at line 110 of file replacementHeap.h.

◆ extract_min()

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

Definition at line 362 of file replacementHeap.h.

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

◆ heapify()

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

Definition at line 317 of file replacementHeap.h.

◆ init()

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

Definition at line 241 of file replacementHeap.h.

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

◆ print()

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

Definition at line 116 of file replacementHeap.h.


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