GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-d6dec75dd4
pqheap_t1< T > Class Template Reference

#include <pqheap.h>

Public Member Functions

 pqheap_t1 (unsigned int size)
 
 pqheap_t1 (T *a, unsigned int size)
 
 ~pqheap_t1 (void)
 
unsigned int fill (T *a, unsigned int size)
 
bool full (void)
 
bool empty (void)
 
bool is_empty ()
 
unsigned int num_elts (void)
 
unsigned int size (void) const
 
bool min (T &elt)
 
min ()
 
bool extract_min (T &elt)
 
bool extract_all_min (T &elt)
 
bool delete_min ()
 
bool insert (const T &elt)
 
void delete_min_and_insert (const T &x)
 
void set (long i, T &elt)
 
void print ()
 
void print_range ()
 

Friends

ostream & operator<< (ostream &s, const pqheap_t1< T > &pq)
 

Detailed Description

template<class T>
class pqheap_t1< T >

Definition at line 103 of file pqheap.h.

Constructor & Destructor Documentation

◆ pqheap_t1() [1/2]

template<class T >
pqheap_t1< T >::pqheap_t1 ( unsigned int  size)
inline

Definition at line 198 of file pqheap.h.

References assert, and PQHEAP_MEM_DEBUG.

◆ pqheap_t1() [2/2]

template<class T >
pqheap_t1< T >::pqheap_t1 ( T *  a,
unsigned int  size 
)
inline

Definition at line 230 of file pqheap.h.

◆ ~pqheap_t1()

template<class T >
pqheap_t1< T >::~pqheap_t1 ( void  )
inline

Definition at line 254 of file pqheap.h.

Member Function Documentation

◆ delete_min()

template<class T >
bool pqheap_t1< T >::delete_min
inline

Definition at line 435 of file pqheap.h.

Referenced by em_pqueue< T, Key >::merge_buffer().

◆ delete_min_and_insert()

template<class T >
void pqheap_t1< T >::delete_min_and_insert ( const T &  x)
inline

Definition at line 507 of file pqheap.h.

References assert, and x.

Referenced by em_pqueue< T, Key >::merge_buffer().

◆ empty()

template<class T >
bool pqheap_t1< T >::empty ( void  )
inline

◆ extract_all_min()

template<class T >
bool pqheap_t1< T >::extract_all_min ( T &  elt)
inline

Definition at line 407 of file pqheap.h.

References min.

◆ extract_min()

template<class T >
bool pqheap_t1< T >::extract_min ( T &  elt)
inline

Definition at line 386 of file pqheap.h.

◆ fill()

template<class T >
unsigned int pqheap_t1< T >::fill ( T *  a,
unsigned int  size 
)
inline

Definition at line 277 of file pqheap.h.

◆ full()

template<class T >
bool pqheap_t1< T >::full ( void  )
inline

Definition at line 297 of file pqheap.h.

◆ insert()

template<class T >
bool pqheap_t1< T >::insert ( const T &  elt)
inline

Definition at line 443 of file pqheap.h.

◆ is_empty()

template<class T >
bool pqheap_t1< T >::is_empty ( )
inline

Definition at line 136 of file pqheap.h.

References pqheap_t1< T >::empty().

◆ min() [1/2]

template<class T >
T pqheap_t1< T >::min

Definition at line 329 of file pqheap.h.

References assert, and min.

◆ min() [2/2]

template<class T >
bool pqheap_t1< T >::min ( T &  elt)
inline

◆ num_elts()

template<class T >
unsigned int pqheap_t1< T >::num_elts ( void  )
inline

Definition at line 311 of file pqheap.h.

◆ print()

template<class T >
void pqheap_t1< T >::print

Definition at line 516 of file pqheap.h.

◆ print_range()

template<class T >
void pqheap_t1< T >::print_range

Definition at line 527 of file pqheap.h.

◆ set()

template<class T >
void pqheap_t1< T >::set ( long  i,
T &  elt 
)
inline

Definition at line 348 of file pqheap.h.

References assert.

◆ size()

template<class T >
unsigned int pqheap_t1< T >::size ( void  ) const
inline

Definition at line 142 of file pqheap.h.

Referenced by em_pqueue< T, Key >::merge_streams().

Friends And Related Function Documentation

◆ operator<<

template<class T >
ostream& operator<< ( ostream &  s,
const pqheap_t1< T > &  pq 
)
friend

Definition at line 171 of file pqheap.h.


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