GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-0824e8842e
|
#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 UNUSED) | |
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) |
em_pqueue< T, Key >::em_pqueue | ( | long | pq_sz, |
long | buf_sz, | ||
unsigned short | nb_buf, | ||
unsigned int | buf_ar | ||
) |
Definition at line 136 of file empq_impl.h.
References assert, getAvailableMemory(), MEMORY_LOG(), and NULL.
Definition at line 224 of file empq_impl.h.
References getAvailableMemory(), and MY_LOG_DEBUG_ID.
Definition at line 164 of file empq.h.
References em_pqueue< T, Key >::em_pqueue().
Referenced by em_pqueue< T, Key >::em_pqueue().
em_pqueue< T, Key >::em_pqueue | ( | MinMaxHeap< T > * | im, |
AMI_STREAM< T > * | amis | ||
) |
Definition at line 353 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, BasicMinMaxHeap< T >::extract_min(), MinMaxHeap< T >::get_maxsize(), LOG_avail_memo(), NULL, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), BasicMinMaxHeap< T >::size(), AMI_STREAM< T >::write_item(), and x.
Definition at line 490 of file empq_impl.h.
References NULL.
|
inlineprotected |
Definition at line 237 of file empq.h.
References em_buffer< T, Key >::get_nbstreams().
|
protected |
Definition at line 968 of file empq_impl.h.
References MY_LOG_DEBUG_ID.
void em_pqueue< T, Key >::clear |
Definition at line 1482 of file empq_impl.h.
References NULL.
|
protected |
Definition at line 954 of file empq_impl.h.
References assert.
|
protected |
Definition at line 1155 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, MEMORY_LOG(), MY_LOG_DEBUG_ID, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), AMI_STREAM< T >::stream_len(), and x.
|
protected |
Definition at line 1086 of file empq_impl.h.
References assert, MEMORY_LOG(), and MY_LOG_DEBUG_ID.
bool em_pqueue< T, Key >::extract_all_min | ( | T & | elt | ) |
Definition at line 802 of file empq_impl.h.
References min, and MY_LOG_DEBUG_ID.
bool em_pqueue< T, Key >::extract_min | ( | T & | elt | ) |
Definition at line 727 of file empq_impl.h.
References assert, MY_LOG_DEBUG_ID, x, and XXX.
|
protected |
Definition at line 574 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, ExtendedMergeStream, MEMORY_LOG(), MY_LOG_DEBUG_ID, NULL, and XXX.
bool em_pqueue< T, Key >::insert | ( | const T & | elt | ) |
Definition at line 1000 of file empq_impl.h.
References assert, MY_LOG_DEBUG_ID, and x.
bool em_pqueue< T, Key >::is_empty |
Definition at line 563 of file empq_impl.h.
|
inline |
long em_pqueue< T, Key >::maxlen |
Definition at line 538 of file empq_impl.h.
long em_pqueue< T, Key >::maxlen | ( | unsigned short | i | ) |
Definition at line 513 of file empq_impl.h.
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1257 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, pqheap_t1< T >::delete_min(), pqheap_t1< T >::delete_min_and_insert(), pqheap_t1< T >::empty(), em_buffer< T, Key >::get_bos(), em_buffer< T, Key >::get_buf_len(), em_buffer< T, Key >::get_level(), em_buffer< T, Key >::get_nbstreams(), em_buffer< T, Key >::get_streams(), MEMORY_LOG(), pqheap_t1< T >::min(), MY_LOG_DEBUG_ID, NULL, em_buffer< T, Key >::put_streams(), and AMI_STREAM< T >::read_item().
|
protected |
Definition at line 851 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, ExtendedEltMergeType< T, Key >::buffer_id(), ExtendedEltMergeType< T, Key >::elt(), MY_LOG_DEBUG_ID, ExtendedEltMergeType< T, Key >::stream_id(), and XXX.
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1380 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, pqheap_t1< T >::empty(), MEMORY_LOG(), pqheap_t1< T >::min(), MY_LOG_DEBUG_ID, and pqheap_t1< T >::size().
bool em_pqueue< T, Key >::min | ( | T & | elt | ) |
Definition at line 658 of file empq_impl.h.
References assert, MY_LOG_DEBUG_ID, and XXX.
void em_pqueue< T, Key >::print |
Definition at line 1523 of file empq_impl.h.
void em_pqueue< T, Key >::print_range |
Definition at line 1498 of file empq_impl.h.
void em_pqueue< T, Key >::print_size |
Definition at line 1546 of file empq_impl.h.
References assert.
|
protected |
Definition at line 1568 of file empq_impl.h.
unsigned long em_pqueue< T, Key >::size |
Definition at line 550 of file empq_impl.h.
|
friend |