GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
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 107 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 204 of file pqheap.h.

References assert, PQHEAP_MEM_DEBUG, and pqheap_t1< T >::size().

◆ pqheap_t1() [2/2]

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

Definition at line 239 of file pqheap.h.

◆ ~pqheap_t1()

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

Definition at line 263 of file pqheap.h.

Member Function Documentation

◆ delete_min()

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

◆ delete_min_and_insert()

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

Definition at line 526 of file pqheap.h.

References assert, and x.

Referenced by em_pqueue< T, Key >::merge_buffer(), pqheap_t1< T >::size(), and em_buffer< T, Key >::sort().

◆ 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 422 of file pqheap.h.

References pqheap_t1< T >::extract_min(), and pqheap_t1< T >::min().

Referenced by pqheap_t1< T >::size().

◆ extract_min()

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

Definition at line 401 of file pqheap.h.

Referenced by pqheap_t1< T >::extract_all_min(), and pqheap_t1< T >::size().

◆ fill()

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

Definition at line 287 of file pqheap.h.

◆ full()

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

Definition at line 308 of file pqheap.h.

Referenced by pqheap_t1< T >::insert().

◆ insert()

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

Definition at line 460 of file pqheap.h.

References pqheap_t1< T >::full().

Referenced by pqheap_t1< T >::size().

◆ is_empty()

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

Definition at line 140 of file pqheap.h.

References pqheap_t1< T >::empty(), and pqheap_t1< T >::num_elts().

◆ min() [1/2]

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

◆ min() [2/2]

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

Definition at line 341 of file pqheap.h.

References assert.

Referenced by pqheap_t1< T >::extract_all_min(), and pqheap_t1< T >::size().

◆ num_elts()

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

Definition at line 322 of file pqheap.h.

Referenced by pqheap_t1< T >::is_empty().

◆ print()

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

Definition at line 537 of file pqheap.h.

◆ print_range()

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

Definition at line 548 of file pqheap.h.

◆ set()

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

Definition at line 362 of file pqheap.h.

References assert.

◆ size()

Friends And Related Function Documentation

◆ operator<<

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

Definition at line 175 of file pqheap.h.


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