GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
em_pqueue< T, Key > Class Template Reference

#include <empq.h>

Public Member Functions

 em_pqueue (long pq_sz, long buf_sz, unsigned short nb_buf, unsigned int buf_ar)
 
 em_pqueue ()
 
 em_pqueue (long N)
 
 em_pqueue (MinMaxHeap< T > *im, AMI_STREAM< T > *amis)
 
 em_pqueue (const em_pqueue &ep)
 
 ~em_pqueue ()
 
unsigned long size ()
 
bool is_empty ()
 
bool is_full ()
 
bool min (T &elt)
 
bool extract_min (T &elt)
 
bool extract_all_min (T &elt)
 
bool insert (const T &elt)
 
long maxlen (unsigned short i)
 
long maxlen ()
 
void clear ()
 
void print_range ()
 
void print ()
 
void print_size ()
 

Protected Member Functions

int active_streams ()
 
bool empty_buff_0 ()
 
void empty_buff (unsigned short i)
 
AMI_err merge_buffer (em_buffer< T, Key > *buf, ExtendedMergeStream *outstr, long K)
 
AMI_err merge_streams (ExtendedMergeStream **instr, unsigned short arity, ExtendedMergeStream *outstr, long K)
 
void delete_str_elt (unsigned short buf_id, unsigned int stream_id)
 
void merge_bufs2pq (ExtendedMergeStream *minstream)
 
void cleanup ()
 
bool fillpq ()
 
void print_stream_sizes ()
 

Friends

ostream & operator<< (ostream &s, const em_pqueue &empq)
 

Detailed Description

template<class T, class Key>
class em_pqueue< T, Key >

Definition at line 136 of file empq.h.

Constructor & Destructor Documentation

◆ em_pqueue() [1/5]

template<class T , class Key >
em_pqueue< T, Key >::em_pqueue ( long  pq_sz,
long  buf_sz,
unsigned short  nb_buf,
unsigned int  buf_ar 
)

Definition at line 138 of file empq_impl.h.

References assert, getAvailableMemory(), MEMORY_LOG(), and NULL.

◆ em_pqueue() [2/5]

template<class T , class Key >
em_pqueue< T, Key >::em_pqueue ( )

Definition at line 232 of file empq_impl.h.

References getAvailableMemory(), and MY_LOG_DEBUG_ID.

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

◆ em_pqueue() [3/5]

template<class T, class Key>
em_pqueue< T, Key >::em_pqueue ( long  N)
inline

◆ em_pqueue() [4/5]

◆ em_pqueue() [5/5]

template<class T, class Key>
em_pqueue< T, Key >::em_pqueue ( const em_pqueue< T, Key > &  ep)

◆ ~em_pqueue()

template<class T , class Key >
em_pqueue< T, Key >::~em_pqueue ( )

Definition at line 500 of file empq_impl.h.

References NULL.

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

Member Function Documentation

◆ active_streams()

◆ cleanup()

template<class T , class Key >
void em_pqueue< T, Key >::cleanup ( )
protected

◆ clear()

template<class T , class Key >
void em_pqueue< T, Key >::clear ( )

Definition at line 1471 of file empq_impl.h.

References NULL.

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

◆ delete_str_elt()

template<class T , class Key >
void em_pqueue< T, Key >::delete_str_elt ( unsigned short  buf_id,
unsigned int  stream_id 
)
protected

Definition at line 949 of file empq_impl.h.

References assert.

Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::merge_bufs2pq().

◆ empty_buff()

◆ empty_buff_0()

◆ extract_all_min()

template<class T , class Key >
bool em_pqueue< T, Key >::extract_all_min ( T &  elt)

◆ extract_min()

◆ fillpq()

◆ insert()

◆ is_empty()

template<class T , class Key >
bool em_pqueue< T, Key >::is_empty ( )

◆ is_full()

◆ maxlen() [1/2]

template<class T , class Key >
long em_pqueue< T, Key >::maxlen ( unsigned short  i)

Definition at line 520 of file empq_impl.h.

◆ maxlen() [2/2]

template<class T , class Key >
long em_pqueue< T, Key >::maxlen ( )

Definition at line 545 of file empq_impl.h.

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

◆ merge_buffer()

◆ merge_bufs2pq()

◆ merge_streams()

template<class T , class Key >
AMI_err em_pqueue< T, Key >::merge_streams ( ExtendedMergeStream **  instr,
unsigned short  arity,
ExtendedMergeStream outstr,
long  K 
)
protected

◆ min()

template<class T , class Key >
bool em_pqueue< T, Key >::min ( T &  elt)

◆ print()

template<class T , class Key >
void em_pqueue< T, Key >::print ( )

◆ print_range()

template<class T , class Key >
void em_pqueue< T, Key >::print_range ( )

Definition at line 1487 of file empq_impl.h.

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

◆ print_size()

template<class T , class Key >
void em_pqueue< T, Key >::print_size ( )

◆ print_stream_sizes()

template<class T , class Key >
void em_pqueue< T, Key >::print_stream_sizes ( )
protected

◆ size()

Friends And Related Function Documentation

◆ operator<<

template<class T, class Key>
ostream& operator<< ( ostream &  s,
const em_pqueue< T, Key > &  empq 
)
friend

Definition at line 235 of file empq.h.


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