51 template <
class T,
class Key>
53 #define ExtendedMergeStream AMI_STREAM<ExtendedEltMergeType<T, Key>>
123 template <
class T,
class Key>
131 unsigned long pqsize;
137 unsigned long bufsize;
149 unsigned short max_nbuf;
152 unsigned short crt_buf;
155 unsigned int buf_arity;
159 em_pqueue(
long pq_sz,
long buf_sz,
unsigned short nb_buf,
160 unsigned int buf_ar);
179 unsigned long size();
187 cout <<
"em_pqueue::is_full(): sorry not implemented\n";
202 bool insert(
const T &elt);
205 long maxlen(
unsigned short i);
223 s <<
"EM_PQ: pq size=" << empq.pqsize
224 <<
", buff_0 size=" << empq.bufsize <<
", ext_bufs=" << empq.crt_buf
225 <<
"(max " << empq.max_nbuf <<
")\n";
226 s <<
"IN_MEMORY PQ: \n" << *(empq.pq) <<
"\n";
227 s <<
"IN_MEMORY BUFFER: \n" << *(empq.buff_0) <<
"\n";
228 for (
unsigned short i = 0; i < empq.crt_buf; i++) {
230 s << *(empq.buff[i]);
240 for (
unsigned short i = 0; i < crt_buf; i++) {
277 void delete_str_elt(
unsigned short buf_id,
unsigned int stream_id);
unsigned int get_nbstreams() const
em_pqueue(const em_pqueue &ep)
void print_stream_sizes()
void delete_str_elt(unsigned short buf_id, unsigned int stream_id)
bool insert(const T &elt)
void merge_bufs2pq(ExtendedMergeStream *minstream)
AMI_err merge_buffer(em_buffer< T, Key > *buf, ExtendedMergeStream *outstr, long K)
void empty_buff(unsigned short i)
bool extract_all_min(T &elt)
AMI_err merge_streams(ExtendedMergeStream **instr, unsigned short arity, ExtendedMergeStream *outstr, long K)
friend ostream & operator<<(ostream &s, const em_pqueue &empq)
#define ExtendedMergeStream
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.