58 #define ExtendedMergeStream AMI_STREAM<ExtendedEltMergeType<T,Key> > 135 template<
class T,
class Key>
144 unsigned long pqsize;
150 unsigned long bufsize;
162 unsigned short max_nbuf;
165 unsigned short crt_buf;
168 unsigned int buf_arity;
174 em_pqueue(
long pq_sz,
long buf_sz,
unsigned short nb_buf,
175 unsigned int buf_ar);
194 unsigned long size();
201 cout <<
"em_pqueue::is_full(): sorry not implemented\n";
216 bool insert(
const T& elt);
219 long maxlen(
unsigned short i);
236 s <<
"EM_PQ: pq size=" << empq.pqsize
237 <<
", buff_0 size=" << empq.bufsize
238 <<
", ext_bufs=" << empq.crt_buf
239 <<
"(max " << empq.max_nbuf <<
")\n";
240 s <<
"IN_MEMORY PQ: \n" << *(empq.pq) <<
"\n";
241 s <<
"IN_MEMORY BUFFER: \n" << *(empq.buff_0) <<
"\n";
242 for (
unsigned short i=0; i < empq.crt_buf; i++) {
244 s << *(empq.buff[i]);
254 for (
unsigned short i = 0; i< crt_buf; i++) {
290 unsigned short arity,
295 unsigned int stream_id);
bool insert(const T &elt)
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)
friend ostream & operator<<(ostream &s, const em_pqueue &empq)
#define ExtendedMergeStream
void delete_str_elt(unsigned short buf_id, unsigned int stream_id)
void merge_bufs2pq(ExtendedMergeStream *minstream)
unsigned int get_nbstreams() const
void print_stream_sizes()
AMI_err merge_streams(ExtendedMergeStream **instr, unsigned short arity, ExtendedMergeStream *outstr, long K)