GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
#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) |
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.
Definition at line 232 of file empq_impl.h.
References getAvailableMemory(), and MY_LOG_DEBUG_ID.
Referenced by em_pqueue< T, Key >::em_pqueue().
Definition at line 179 of file empq.h.
References em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::is_empty(), em_pqueue< T, Key >::size(), and 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 363 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 500 of file empq_impl.h.
References NULL.
Referenced by em_pqueue< T, Key >::em_pqueue().
|
inlineprotected |
Definition at line 252 of file empq.h.
References em_pqueue< T, Key >::cleanup(), em_pqueue< T, Key >::delete_str_elt(), em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::empty_buff_0(), ExtendedMergeStream, em_pqueue< T, Key >::fillpq(), em_buffer< T, Key >::get_nbstreams(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_bufs2pq(), em_pqueue< T, Key >::merge_streams(), and em_pqueue< T, Key >::print_stream_sizes().
Referenced by em_pqueue< T, Key >::extract_min(), and em_pqueue< T, Key >::insert().
|
protected |
Definition at line 964 of file empq_impl.h.
References em_pqueue< T, Key >::is_empty(), and MY_LOG_DEBUG_ID.
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::merge_bufs2pq().
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().
|
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().
|
protected |
Definition at line 1145 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, em_pqueue< T, Key >::is_full(), MEMORY_LOG(), MY_LOG_DEBUG_ID, em_pqueue< T, Key >::print_size(), AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), em_pqueue< T, Key >::size(), AMI_STREAM< T >::stream_len(), and x.
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::empty_buff_0().
|
protected |
Definition at line 1077 of file empq_impl.h.
References assert, em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::is_full(), MEMORY_LOG(), MY_LOG_DEBUG_ID, em_pqueue< T, Key >::print_size(), and em_pqueue< T, Key >::size().
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::insert().
bool em_pqueue< T, Key >::extract_all_min | ( | T & | elt | ) |
Definition at line 804 of file empq_impl.h.
References em_pqueue< T, Key >::extract_min(), em_pqueue< T, Key >::min(), MY_LOG_DEBUG_ID, and em_pqueue< T, Key >::print().
Referenced by em_pqueue< T, Key >::is_full().
bool em_pqueue< T, Key >::extract_min | ( | T & | elt | ) |
Definition at line 731 of file empq_impl.h.
References em_pqueue< T, Key >::active_streams(), assert, em_pqueue< T, Key >::fillpq(), MY_LOG_DEBUG_ID, em_pqueue< T, Key >::print(), em_pqueue< T, Key >::print_stream_sizes(), em_pqueue< T, Key >::size(), x, and XXX.
Referenced by em_pqueue< T, Key >::extract_all_min(), and em_pqueue< T, Key >::is_full().
|
protected |
Definition at line 583 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, ExtendedMergeStream, MEMORY_LOG(), em_pqueue< T, Key >::merge_buffer(), em_pqueue< T, Key >::merge_bufs2pq(), em_pqueue< T, Key >::merge_streams(), MY_LOG_DEBUG_ID, NULL, and XXX.
Referenced by em_pqueue< T, Key >::active_streams(), em_pqueue< T, Key >::extract_min(), and em_pqueue< T, Key >::min().
bool em_pqueue< T, Key >::insert | ( | const T & | elt | ) |
Definition at line 994 of file empq_impl.h.
References em_pqueue< T, Key >::active_streams(), assert, em_pqueue< T, Key >::empty_buff_0(), MY_LOG_DEBUG_ID, em_pqueue< T, Key >::print(), em_pqueue< T, Key >::print_stream_sizes(), em_pqueue< T, Key >::size(), and x.
Referenced by em_pqueue< T, Key >::is_full().
bool em_pqueue< T, Key >::is_empty | ( | ) |
Definition at line 571 of file empq_impl.h.
References em_pqueue< T, Key >::size().
Referenced by em_pqueue< T, Key >::cleanup(), and em_pqueue< T, Key >::em_pqueue().
|
inline |
Definition at line 200 of file empq.h.
References em_pqueue< T, Key >::clear(), em_pqueue< T, Key >::extract_all_min(), em_pqueue< T, Key >::extract_min(), em_pqueue< T, Key >::insert(), em_pqueue< T, Key >::maxlen(), em_pqueue< T, Key >::min(), em_pqueue< T, Key >::print(), em_pqueue< T, Key >::print_range(), and em_pqueue< T, Key >::print_size().
Referenced by em_pqueue< T, Key >::empty_buff(), and em_pqueue< T, Key >::empty_buff_0().
long em_pqueue< T, Key >::maxlen | ( | unsigned short | i | ) |
Definition at line 520 of file empq_impl.h.
long em_pqueue< T, Key >::maxlen | ( | ) |
Definition at line 545 of file empq_impl.h.
Referenced by em_pqueue< T, Key >::is_full().
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1244 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(), ExtendedEltMergeType< T, Key >::getPriority(), MEMORY_LOG(), pqheap_t1< T >::min(), MY_LOG_DEBUG_ID, NULL, em_buffer< T, Key >::put_streams(), and AMI_STREAM< T >::read_item().
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::fillpq().
|
protected |
Definition at line 853 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, assert, ExtendedEltMergeType< T, Key >::buffer_id(), em_pqueue< T, Key >::cleanup(), em_pqueue< T, Key >::delete_str_elt(), ExtendedEltMergeType< T, Key >::elt(), MY_LOG_DEBUG_ID, ExtendedEltMergeType< T, Key >::stream_id(), and XXX.
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::fillpq().
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1369 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().
Referenced by em_pqueue< T, Key >::active_streams(), and em_pqueue< T, Key >::fillpq().
bool em_pqueue< T, Key >::min | ( | T & | elt | ) |
Definition at line 664 of file empq_impl.h.
References assert, em_pqueue< T, Key >::fillpq(), MY_LOG_DEBUG_ID, em_pqueue< T, Key >::print_size(), and XXX.
Referenced by em_pqueue< T, Key >::extract_all_min(), and em_pqueue< T, Key >::is_full().
void em_pqueue< T, Key >::print | ( | ) |
Definition at line 1516 of file empq_impl.h.
Referenced by em_pqueue< T, Key >::extract_all_min(), em_pqueue< T, Key >::extract_min(), em_pqueue< T, Key >::insert(), and em_pqueue< T, Key >::is_full().
void em_pqueue< T, Key >::print_range | ( | ) |
Definition at line 1487 of file empq_impl.h.
Referenced by em_pqueue< T, Key >::is_full().
void em_pqueue< T, Key >::print_size | ( | ) |
Definition at line 1540 of file empq_impl.h.
References assert.
Referenced by em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::empty_buff_0(), em_pqueue< T, Key >::is_full(), and em_pqueue< T, Key >::min().
|
protected |
Definition at line 1560 of file empq_impl.h.
Referenced by em_pqueue< T, Key >::active_streams(), em_pqueue< T, Key >::extract_min(), and em_pqueue< T, Key >::insert().
unsigned long em_pqueue< T, Key >::size | ( | ) |
Definition at line 558 of file empq_impl.h.
Referenced by em_pqueue< T, Key >::em_pqueue(), em_pqueue< T, Key >::empty_buff(), em_pqueue< T, Key >::empty_buff_0(), em_pqueue< T, Key >::extract_min(), em_pqueue< T, Key >::insert(), and em_pqueue< T, Key >::is_empty().
|
friend |