GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71915
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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

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 
)
template<class T , class Key >
em_pqueue< T, Key >::em_pqueue ( )
template<class T, class Key>
em_pqueue< T, Key >::em_pqueue ( long  N)
inline

Definition at line 179 of file empq.h.

References em_pqueue< T, Key >::em_pqueue().

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

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

Definition at line 500 of file empq_impl.h.

References buff, and NULL.

Member Function Documentation

template<class T, class Key>
int em_pqueue< T, Key >::active_streams ( )
inlineprotected

Definition at line 252 of file empq.h.

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

Definition at line 964 of file empq_impl.h.

References buff, and MY_LOG_DEBUG_ID.

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

Definition at line 1471 of file empq_impl.h.

References buff, and NULL.

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 buff.

template<class T , class Key >
void em_pqueue< T, Key >::empty_buff ( unsigned short  i)
protected
template<class T , class Key >
bool em_pqueue< T, Key >::empty_buff_0 ( )
protected

Definition at line 1077 of file empq_impl.h.

References buff, MEMORY_LOG(), and MY_LOG_DEBUG_ID.

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

Definition at line 804 of file empq_impl.h.

References min, and MY_LOG_DEBUG_ID.

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

Definition at line 731 of file empq_impl.h.

References MY_LOG_DEBUG_ID, and XXX.

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

Definition at line 583 of file empq_impl.h.

References AMI_ERROR_NO_ERROR, buff, ExtendedMergeStream, MEMORY_LOG(), MY_LOG_DEBUG_ID, NULL, and XXX.

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

Definition at line 994 of file empq_impl.h.

References MY_LOG_DEBUG_ID, and x.

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

Definition at line 571 of file empq_impl.h.

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

Definition at line 200 of file empq.h.

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

Definition at line 520 of file empq_impl.h.

References buff, and em_buffer< T, Key >::get_buf_maxlen().

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

Definition at line 545 of file empq_impl.h.

template<class T , class Key >
void em_pqueue< T, Key >::merge_bufs2pq ( ExtendedMergeStream minstream)
protected
template<class T , class Key >
AMI_err em_pqueue< T, Key >::merge_streams ( ExtendedMergeStream **  instr,
unsigned short  arity,
ExtendedMergeStream outstr,
long  K 
)
protected
template<class T , class Key >
bool em_pqueue< T, Key >::min ( T &  elt)

Definition at line 664 of file empq_impl.h.

References MY_LOG_DEBUG_ID, and XXX.

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

Definition at line 1516 of file empq_impl.h.

References buff.

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

Definition at line 1487 of file empq_impl.h.

References buff.

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

Definition at line 1540 of file empq_impl.h.

References buff.

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

Definition at line 1560 of file empq_impl.h.

References buff.

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

Definition at line 558 of file empq_impl.h.

References buff.

Friends And Related Function Documentation

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: