4 #ifndef IBIS_COLVALUES_H
5 #define IBIS_COLVALUES_H
23 const uint32_t start,
const uint32_t end);
29 const char*
name()
const {
return(col!=0?col->name():0);}
31 virtual bool empty()
const = 0;
35 virtual void erase(uint32_t i, uint32_t j) = 0;
36 virtual void swap(uint32_t i, uint32_t j) = 0;
37 virtual uint32_t size()
const = 0;
38 virtual uint32_t elementSize()
const = 0;
47 {
return (col ? col->type() !=
ibis::TEXT :
false);}
49 void swap(colValues& rhs) {
56 virtual long write(FILE* fptr)
const = 0;
58 virtual void write(std::ostream& out, uint32_t i)
const = 0;
61 virtual void sort(uint32_t i, uint32_t j, bundle* bdl) = 0;
64 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
65 colList::iterator head, colList::iterator tail) = 0;
68 virtual void sort(uint32_t i, uint32_t j,
69 array_t<uint32_t>& neworder)
const = 0;
72 virtual void reorder(
const array_t<uint32_t>& ind) = 0;
75 virtual array_t<uint32_t>*
76 segment(
const array_t<uint32_t>* old=0)
const = 0;
78 virtual long truncate(uint32_t keep) = 0;
80 virtual long truncate(uint32_t keep, uint32_t start) = 0;
82 virtual void topk(uint32_t k, array_t<uint32_t> &ind)
const = 0;
84 virtual void bottomk(uint32_t k, array_t<uint32_t> &ind)
const = 0;
86 virtual double getMin()
const = 0;
87 virtual double getMax()
const = 0;
88 virtual double getSum()
const = 0;
89 virtual int32_t getInt(uint32_t)
const = 0;
90 virtual uint32_t getUInt(uint32_t)
const = 0;
91 virtual int64_t getLong(uint32_t)
const = 0;
92 virtual uint64_t getULong(uint32_t)
const = 0;
93 virtual float getFloat(uint32_t)
const = 0;
94 virtual double getDouble(uint32_t)
const = 0;
106 colValues& operator=(
const colValues&);
116 const uint32_t start,
const uint32_t nelm)
119 virtual ~
colInts() {
delete array;}
121 virtual bool empty()
const {
return (col==0 || array==0);}
122 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
123 virtual uint32_t elementSize()
const {
return sizeof(int32_t);}
131 virtual void erase(uint32_t i, uint32_t j) {
132 array->erase(array->begin()+i, array->begin()+j);}
133 virtual void swap(uint32_t i, uint32_t j) {
134 int32_t tmp = (*array)[i];
135 (*array)[i] = (*array)[j];
138 void swap(colInts& rhs) {
139 const ibis::column* c = rhs.col; rhs.col = col; col = c;
140 array_t<int32_t>* a = rhs.array; rhs.array = array; array = a;}
142 virtual long write(FILE* fptr)
const;
143 virtual void write(std::ostream& out, uint32_t i)
const;
145 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
146 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
147 colList::iterator head, colList::iterator tail);
148 virtual void sort(uint32_t i, uint32_t j,
149 array_t<uint32_t>& neworder)
const;
150 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
154 {array->topk(k, ind);}
156 {array->bottomk(k, ind);}
157 virtual long truncate(uint32_t keep);
158 virtual long truncate(uint32_t keep, uint32_t start);
160 virtual double getMin()
const;
161 virtual double getMax()
const;
162 virtual double getSum()
const;
163 virtual int32_t getInt(uint32_t i)
const {
return (*array)[i];}
164 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
165 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
166 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
167 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
168 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
171 array_t<int32_t>* array;
173 colInts(
const colInts&);
174 colInts& operator=(
const colInts&);
183 const uint32_t start,
const uint32_t nelm);
187 virtual bool empty()
const {
return (col==0 || array==0);}
188 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
189 virtual uint32_t elementSize()
const {
return sizeof(uint32_t);}
194 virtual void erase(uint32_t i, uint32_t j) {
195 array->erase(array->begin()+i, array->begin()+j);}
196 virtual void swap(uint32_t i, uint32_t j) {
197 uint32_t tmp = (*array)[i];
198 (*array)[i] = (*array)[j];
201 virtual void reduce(
const array_t<uint32_t>& starts);
202 virtual void reduce(
const array_t<uint32_t>& starts,
204 void swap(colUInts& rhs) {
205 const ibis::column* c = rhs.col; rhs.col = col; col = c;
206 array_t<uint32_t>* a = rhs.array; rhs.array = array; array = a;}
208 virtual long write(FILE* fptr)
const;
209 virtual void write(std::ostream& out, uint32_t i)
const;
211 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
212 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
213 colList::iterator head, colList::iterator tail);
214 virtual void sort(uint32_t i, uint32_t j,
215 array_t<uint32_t>& neworder)
const;
216 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
220 {array->topk(k, ind);}
222 {array->bottomk(k, ind);}
223 virtual long truncate(uint32_t keep);
224 virtual long truncate(uint32_t keep, uint32_t start);
226 virtual double getMin()
const;
227 virtual double getMax()
const;
228 virtual double getSum()
const;
229 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
230 virtual uint32_t getUInt(uint32_t i)
const {
return (*array)[i];}
231 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
232 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
233 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
234 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
237 array_t<uint32_t>* array;
238 const dictionary* dic;
240 colUInts(
const colUInts&);
241 colUInts& operator=(
const colUInts&);
251 const uint32_t start,
const uint32_t nelm)
256 virtual bool empty()
const {
return (col==0 || array==0);}
257 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
258 virtual uint32_t elementSize()
const {
return sizeof(int64_t);}
266 virtual void erase(uint32_t i, uint32_t j) {
267 array->erase(array->begin()+i, array->begin()+j);}
268 virtual void swap(uint32_t i, uint32_t j) {
269 int64_t tmp = (*array)[i];
270 (*array)[i] = (*array)[j];
273 void swap(colLongs& rhs) {
274 const ibis::column* c = rhs.col; rhs.col = col; col = c;
275 array_t<int64_t>* a = rhs.array; rhs.array = array; array = a;}
277 virtual long write(FILE* fptr)
const;
278 virtual void write(std::ostream& out, uint32_t i)
const;
280 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
281 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
282 colList::iterator head, colList::iterator tail);
283 virtual void sort(uint32_t i, uint32_t j,
284 array_t<uint32_t>& neworder)
const;
285 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
289 {array->topk(k, ind);}
291 {array->bottomk(k, ind);}
292 virtual long truncate(uint32_t keep);
293 virtual long truncate(uint32_t keep, uint32_t start);
295 virtual double getMin()
const;
296 virtual double getMax()
const;
297 virtual double getSum()
const;
298 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
299 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
300 virtual int64_t getLong(uint32_t i)
const {
return (*array)[i];}
301 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
302 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
303 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
306 array_t<int64_t>* array;
308 colLongs(
const colLongs&);
309 colLongs& operator=(
const colLongs&);
319 const uint32_t start,
const uint32_t nelm)
324 virtual bool empty()
const {
return (col==0 || array==0);}
325 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
326 virtual uint32_t elementSize()
const {
return sizeof(uint64_t);}
331 virtual void erase(uint32_t i, uint32_t j) {
332 array->erase(array->begin()+i, array->begin()+j);}
333 virtual void swap(uint32_t i, uint32_t j) {
334 uint64_t tmp = (*array)[i];
335 (*array)[i] = (*array)[j];
338 virtual void reduce(
const array_t<uint32_t>& starts);
339 virtual void reduce(
const array_t<uint32_t>& starts,
341 void swap(colULongs& rhs) {
342 const ibis::column* c = rhs.col; rhs.col = col; col = c;
343 array_t<uint64_t>* a = rhs.array; rhs.array = array; array = a;}
345 virtual long write(FILE* fptr)
const;
346 virtual void write(std::ostream& out, uint32_t i)
const;
348 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
349 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
350 colList::iterator head, colList::iterator tail);
351 virtual void sort(uint32_t i, uint32_t j,
352 array_t<uint32_t>& neworder)
const;
353 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
357 {array->topk(k, ind);}
359 {array->bottomk(k, ind);}
360 virtual long truncate(uint32_t keep);
361 virtual long truncate(uint32_t keep, uint32_t start);
363 virtual double getMin()
const;
364 virtual double getMax()
const;
365 virtual double getSum()
const;
366 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
367 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
368 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
369 virtual uint64_t getULong(uint32_t i)
const {
return (*array)[i];}
370 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
371 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
374 array_t<uint64_t>* array;
376 colULongs(
const colULongs&);
377 colULongs& operator=(
const colULongs&);
387 const uint32_t start,
const uint32_t nelm)
392 virtual bool empty()
const {
return (col==0 || array==0);}
393 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
394 virtual uint32_t elementSize()
const {
return sizeof(int16_t);}
402 virtual void erase(uint32_t i, uint32_t j) {
403 array->erase(array->begin()+i, array->begin()+j);}
404 virtual void swap(uint32_t i, uint32_t j) {
405 int16_t tmp = (*array)[i];
406 (*array)[i] = (*array)[j];
409 void swap(colShorts& rhs) {
410 const ibis::column* c = rhs.col; rhs.col = col; col = c;
411 array_t<int16_t>* a = rhs.array; rhs.array = array; array = a;}
413 virtual long write(FILE* fptr)
const;
414 virtual void write(std::ostream& out, uint32_t i)
const;
416 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
417 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
418 colList::iterator head, colList::iterator tail);
419 virtual void sort(uint32_t i, uint32_t j,
420 array_t<uint32_t>& neworder)
const;
421 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
425 {array->topk(k, ind);}
427 {array->bottomk(k, ind);}
428 virtual long truncate(uint32_t keep);
429 virtual long truncate(uint32_t keep, uint32_t start);
431 virtual double getMin()
const;
432 virtual double getMax()
const;
433 virtual double getSum()
const;
434 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
435 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
436 virtual int64_t getLong(uint32_t i)
const {
return (*array)[i];}
437 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
438 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
439 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
442 array_t<int16_t>* array;
444 colShorts(
const colShorts&);
445 colShorts& operator=(
const colShorts&);
455 const uint32_t start,
const uint32_t nelm)
460 virtual bool empty()
const {
return (col==0 || array==0);}
461 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
462 virtual uint32_t elementSize()
const {
return sizeof(uint16_t);}
467 virtual void erase(uint32_t i, uint32_t j) {
468 array->erase(array->begin()+i, array->begin()+j);}
469 virtual void swap(uint32_t i, uint32_t j) {
470 uint16_t tmp = (*array)[i];
471 (*array)[i] = (*array)[j];
474 virtual void reduce(
const array_t<uint32_t>& starts);
475 virtual void reduce(
const array_t<uint32_t>& starts,
477 void swap(colUShorts& rhs) {
478 const ibis::column* c = rhs.col; rhs.col = col; col = c;
479 array_t<uint16_t>* a = rhs.array; rhs.array = array; array = a;}
481 virtual long write(FILE* fptr)
const;
482 virtual void write(std::ostream& out, uint32_t i)
const;
484 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
485 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
486 colList::iterator head, colList::iterator tail);
487 virtual void sort(uint32_t i, uint32_t j,
488 array_t<uint32_t>& neworder)
const;
489 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
493 {array->topk(k, ind);}
495 {array->bottomk(k, ind);}
496 virtual long truncate(uint32_t keep);
497 virtual long truncate(uint32_t keep, uint32_t start);
499 virtual double getMin()
const;
500 virtual double getMax()
const;
501 virtual double getSum()
const;
502 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
503 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
504 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
505 virtual uint64_t getULong(uint32_t i)
const {
return (*array)[i];}
506 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
507 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
510 array_t<uint16_t>* array;
512 colUShorts(
const colUShorts&);
513 colUShorts& operator=(
const colUShorts&);
523 const uint32_t start,
const uint32_t nelm)
528 virtual bool empty()
const {
return (col==0 || array==0);}
529 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
530 virtual uint32_t elementSize()
const {
return sizeof(char);}
538 virtual void erase(uint32_t i, uint32_t j) {
539 array->erase(array->begin()+i, array->begin()+j);}
540 virtual void swap(uint32_t i, uint32_t j) {
541 signed char tmp = (*array)[i];
542 (*array)[i] = (*array)[j];
545 void swap(colBytes& rhs) {
546 const ibis::column* c = rhs.col; rhs.col = col; col = c;
547 array_t<signed char>* a = rhs.array; rhs.array = array; array = a;}
549 virtual long write(FILE* fptr)
const;
550 virtual void write(std::ostream& out, uint32_t i)
const;
552 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
553 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
554 colList::iterator head, colList::iterator tail);
555 virtual void sort(uint32_t i, uint32_t j,
556 array_t<uint32_t>& neworder)
const;
557 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
561 {array->topk(k, ind);}
563 {array->bottomk(k, ind);}
564 virtual long truncate(uint32_t keep);
565 virtual long truncate(uint32_t keep, uint32_t start);
567 virtual double getMin()
const;
568 virtual double getMax()
const;
569 virtual double getSum()
const;
570 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
571 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
572 virtual int64_t getLong(uint32_t i)
const {
return (*array)[i];}
573 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
574 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
575 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
578 array_t<signed char>* array;
580 colBytes(
const colBytes&);
581 colBytes& operator=(
const colBytes&);
591 const uint32_t start,
const uint32_t nelm)
596 virtual bool empty()
const {
return (col==0 || array==0);}
597 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
598 virtual uint32_t elementSize()
const {
return sizeof(char);}
603 virtual void erase(uint32_t i, uint32_t j) {
604 array->erase(array->begin()+i, array->begin()+j);}
605 virtual void swap(uint32_t i, uint32_t j) {
606 unsigned char tmp = (*array)[i];
607 (*array)[i] = (*array)[j];
610 virtual void reduce(
const array_t<uint32_t>& starts);
611 virtual void reduce(
const array_t<uint32_t>& starts,
613 void swap(colUBytes& rhs) {
614 const ibis::column* c = rhs.col; rhs.col = col; col = c;
615 array_t<unsigned char>* a = rhs.array; rhs.array = array; array = a;}
617 virtual long write(FILE* fptr)
const;
618 virtual void write(std::ostream& out, uint32_t i)
const;
620 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
621 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
622 colList::iterator head, colList::iterator tail);
623 virtual void sort(uint32_t i, uint32_t j,
624 array_t<uint32_t>& neworder)
const;
625 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
629 {array->topk(k, ind);}
631 {array->bottomk(k, ind);}
632 virtual long truncate(uint32_t keep);
633 virtual long truncate(uint32_t keep, uint32_t start);
635 virtual double getMin()
const;
636 virtual double getMax()
const;
637 virtual double getSum()
const;
638 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
639 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
640 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
641 virtual uint64_t getULong(uint32_t i)
const {
return (*array)[i];}
642 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
643 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
646 array_t<unsigned char>* array;
648 colUBytes(
const colUBytes&);
649 colUBytes& operator=(
const colUBytes&);
659 const uint32_t start,
const uint32_t nelm)
664 virtual bool empty()
const {
return (col==0 || array==0);}
665 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
666 virtual uint32_t elementSize()
const {
return sizeof(float);}
671 virtual void erase(uint32_t i, uint32_t j) {
672 array->erase(array->begin()+i, array->begin()+j);}
673 virtual void swap(uint32_t i, uint32_t j) {
674 float tmp = (*array)[i];
675 (*array)[i] = (*array)[j];
678 void swap(colFloats& rhs) {
679 const ibis::column* c = rhs.col; rhs.col = col; col = c;
680 array_t<float>* a = rhs.array; rhs.array = array; array = a;}
681 virtual void reduce(
const array_t<uint32_t>& starts);
682 virtual void reduce(
const array_t<uint32_t>& starts,
685 virtual long write(FILE* fptr)
const;
686 virtual void write(std::ostream& out, uint32_t i)
const;
688 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
689 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
690 colList::iterator head, colList::iterator tail);
691 virtual void sort(uint32_t i, uint32_t j,
692 array_t<uint32_t>& neworder)
const;
693 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
697 {array->topk(k, ind);}
699 {array->bottomk(k, ind);}
700 virtual long truncate(uint32_t keep);
701 virtual long truncate(uint32_t keep, uint32_t start);
703 virtual double getMin()
const;
704 virtual double getMax()
const;
705 virtual double getSum()
const;
706 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
707 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
708 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
709 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
710 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
711 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
714 array_t<float>* array;
716 colFloats(
const colFloats&);
717 colFloats& operator=(
const colFloats&);
727 const uint32_t start,
const uint32_t end)
733 virtual bool empty()
const {
return (col==0 || array==0);}
734 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
735 virtual uint32_t elementSize()
const {
return sizeof(double);}
740 virtual void erase(uint32_t i, uint32_t j) {
741 array->erase(array->begin()+i, array->begin()+j);}
742 virtual void swap(uint32_t i, uint32_t j) {
743 double tmp = (*array)[i];
744 (*array)[i] = (*array)[j];
747 void swap(colDoubles& rhs) {
748 const ibis::column* c = rhs.col; rhs.col = col; col = c;
749 array_t<double>* a = rhs.array; rhs.array = array; array = a;}
750 virtual void reduce(
const array_t<uint32_t>& starts);
751 virtual void reduce(
const array_t<uint32_t>& starts,
754 virtual long write(FILE* fptr)
const;
755 virtual void write(std::ostream& out, uint32_t i)
const;
757 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
758 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
759 colList::iterator head, colList::iterator tail);
760 virtual void sort(uint32_t i, uint32_t j,
761 array_t<uint32_t>& neworder)
const;
762 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
766 {array->topk(k, ind);}
768 {array->bottomk(k, ind);}
769 virtual long truncate(uint32_t keep);
770 virtual long truncate(uint32_t keep, uint32_t start);
772 virtual double getMin()
const;
773 virtual double getMax()
const;
774 virtual double getSum()
const;
775 virtual int32_t getInt(uint32_t i)
const {
return (int32_t)(*array)[i];}
776 virtual uint32_t getUInt(uint32_t i)
const {
return (uint32_t)(*array)[i];}
777 virtual int64_t getLong(uint32_t i)
const {
return (int64_t)(*array)[i];}
778 virtual uint64_t getULong(uint32_t i)
const {
return (uint64_t)(*array)[i];}
779 virtual float getFloat(uint32_t i)
const {
return (
float)(*array)[i];};
780 virtual double getDouble(uint32_t i)
const {
return (
double)(*array)[i];};
783 array_t<double>* array;
785 colDoubles(
const colDoubles&);
786 colDoubles& operator=(
const colDoubles&);
797 : array(
new std::vector<std::string>(n, v)) {}
800 virtual bool empty()
const {
return (col==0 || array==0);}
801 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
802 virtual uint32_t elementSize()
const {
return 0;}
808 virtual void erase(uint32_t i, uint32_t j) {
809 array->erase(array->begin()+i, array->begin()+j);}
810 virtual void swap(uint32_t i, uint32_t j) {(*array)[i].swap((*array)[j]);}
812 void swap(colStrings& rhs) {
813 const ibis::column* c = rhs.col; rhs.col = col; col = c;
814 std::vector<std::string>* a = rhs.array; rhs.array = array; array = a;}
815 virtual void reduce(
const array_t<uint32_t>& starts);
816 virtual void reduce(
const array_t<uint32_t>& starts,
819 virtual long write(FILE* fptr)
const;
820 virtual void write(std::ostream& out, uint32_t i)
const;
822 virtual void sort(uint32_t i, uint32_t j, bundle* bdl);
823 virtual void sort(uint32_t i, uint32_t j, bundle* bdl,
824 colList::iterator head, colList::iterator tail);
825 virtual void sort(uint32_t i, uint32_t j,
826 array_t<uint32_t>& neworder)
const;
827 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>* old=0)
const;
828 virtual void reorder(
const array_t<uint32_t>& ind);
829 virtual void topk(uint32_t k, array_t<uint32_t> &ind)
const;
830 virtual void bottomk(uint32_t k, array_t<uint32_t> &ind)
const;
831 virtual long truncate(uint32_t keep);
832 virtual long truncate(uint32_t keep, uint32_t start);
835 virtual double getMin()
const {
return FASTBIT_DOUBLE_NULL;}
837 virtual double getMax()
const {
return FASTBIT_DOUBLE_NULL;}
839 virtual double getSum()
const {
return FASTBIT_DOUBLE_NULL;}
841 virtual int32_t
getInt(uint32_t)
const {
return 0;}
843 virtual uint32_t
getUInt(uint32_t)
const {
return 0;}
845 virtual int64_t
getLong(uint32_t)
const {
return 0;}
847 virtual uint64_t
getULong(uint32_t)
const {
return 0;}
849 virtual float getFloat(uint32_t)
const {
return FASTBIT_FLOAT_NULL;}
851 virtual double getDouble(uint32_t)
const {
return FASTBIT_DOUBLE_NULL;}
855 std::vector<std::string>* array;
870 :
colValues(c), array(c->selectOpaques(hits)) {}
872 colBlobs(
size_t n,
const ibis::opaque& v)
873 : array(
new std::vector<ibis::opaque>(n, v)) {}
876 virtual bool empty()
const {
return (col==0 || array==0);}
877 virtual uint32_t size()
const {
return (array ? array->size() : 0);}
878 virtual uint32_t elementSize()
const {
return 0;}
883 virtual void erase(uint32_t i, uint32_t j) {
884 array->erase(array->begin()+i, array->begin()+j);}
885 virtual void swap(uint32_t i, uint32_t j) {(*array)[i].swap((*array)[j]);}
887 void swap(colBlobs& rhs) {
888 const ibis::column* c = rhs.col; rhs.col = col; col = c;
889 std::vector<ibis::opaque>* a = rhs.array; rhs.array = array; array = a;}
890 virtual void reduce(
const array_t<uint32_t>&);
891 virtual void reduce(
const array_t<uint32_t>&,
894 virtual long write(FILE* fptr)
const;
895 virtual void write(std::ostream& out, uint32_t i)
const;
897 virtual void sort(uint32_t, uint32_t, bundle*);
898 virtual void sort(uint32_t, uint32_t, bundle*,
899 colList::iterator, colList::iterator);
900 virtual void sort(uint32_t, uint32_t,
901 array_t<uint32_t>&)
const;
902 virtual array_t<uint32_t>*
segment(
const array_t<uint32_t>*)
const;
903 virtual void reorder(
const array_t<uint32_t>& ind);
904 virtual void topk(uint32_t k, array_t<uint32_t> &ind)
const;
905 virtual void bottomk(uint32_t k, array_t<uint32_t> &ind)
const;
906 virtual long truncate(uint32_t keep);
907 virtual long truncate(uint32_t keep, uint32_t start);
910 virtual double getMin()
const {
return FASTBIT_DOUBLE_NULL;}
912 virtual double getMax()
const {
return FASTBIT_DOUBLE_NULL;}
914 virtual double getSum()
const {
return FASTBIT_DOUBLE_NULL;}
916 virtual int32_t
getInt(uint32_t)
const {
return 0;}
918 virtual uint32_t
getUInt(uint32_t)
const {
return 0;}
920 virtual int64_t
getLong(uint32_t)
const {
return 0;}
922 virtual uint64_t
getULong(uint32_t)
const {
return 0;}
924 virtual float getFloat(uint32_t)
const {
return FASTBIT_FLOAT_NULL;}
926 virtual double getDouble(uint32_t)
const {
return FASTBIT_DOUBLE_NULL;}
930 std::vector<ibis::opaque>* array;
A class to store string values.
Definition: colValues.h:790
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:560
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:492
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:1535
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:3717
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.cpp:7070
!< One bit per record, represented by a bit vector.
Definition: table.h:44
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:763
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:4370
const char * name() const
Name.
Definition: colValues.h:29
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6860
virtual int32_t getInt(uint32_t) const
Return the ith value as int. NOT implemented.
Definition: colValues.h:916
virtual double getMax() const
Compute the maximum. NOT implemented.
Definition: colValues.h:837
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:600
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7199
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7295
virtual array_t< float > * selectFloats(const bitvector &mask) const
Put selected values of a float column into an array.
Definition: column.cpp:3452
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:3789
virtual double getMax() const
Compute the maximum. NOT implemented.
Definition: colValues.h:912
virtual uint32_t getUInt(uint32_t) const
Return the ith value as unsigned int. NOT implemented.
Definition: colValues.h:843
ibis::column::unixTimeScribe * utform
!< The column where the value is from.
Definition: colValues.h:100
virtual array_t< signed char > * selectBytes(const bitvector &mask) const
Retrieve selected 1-byte integer values.
Definition: column.cpp:1118
virtual long truncate(uint32_t keep)=0
Truncate the number element to no more than keep.
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:286
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:151
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7318
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:2605
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6952
virtual long write(FILE *fptr) const =0
Write out whole array as binary.
virtual array_t< uint16_t > * selectUShorts(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:1593
The storage class treats all memory as char*.
Definition: fileManager.h:237
virtual int32_t getInt(uint32_t) const
Return the ith value as int. NOT implemented.
Definition: colValues.h:841
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Find positions of the k smallest strings.
Definition: colValues.cpp:7134
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:628
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const =0
Return the positions of the k largest elements.
virtual double getMin() const
Compute the minimum. NOT implemented.
Definition: colValues.h:910
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:879
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6997
virtual double getDouble(uint32_t) const
Return the ith value as double. NOT implemented.
Definition: colValues.h:926
!< Four-byte signed integers, internally int32_t.
Definition: table.h:35
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7211
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:558
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:3213
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4433
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:327
FastBit sorting functions and other utilities.
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:155
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:669
virtual int64_t getLong(uint32_t) const
Return the ith value as long. NOT implemented.
Definition: colValues.h:920
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6820
virtual int64_t getLong(uint32_t) const
Return the ith value as long. NOT implemented.
Definition: colValues.h:845
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6976
virtual array_t< double > * selectDoubles(const bitvector &mask) const
Put the selected values into an array as doubles.
Definition: column.cpp:3823
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6883
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:260
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:803
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:464
The current implementation of FastBit is code named IBIS; most data structures and functions are in t...
Definition: bord.h:16
!< Eight-byte unsigned integers, internally uint64_t.
Definition: table.h:38
The class to represent a column of a data partition.
Definition: column.h:65
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:698
virtual void * getArray() const =0
Return the pointer to the pointer to underlying array_t object.
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:1321
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Fill the array ind with positions of the k largest elements.
Definition: colValues.cpp:7086
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:3572
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:1749
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:422
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:736
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4447
virtual array_t< uint64_t > * selectULongs(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:3077
A class to store unsigned 64-bit integer values.
Definition: colValues.h:313
!< Two-byte unsigned integers, internally uint16_t.
Definition: table.h:34
virtual double getSum() const
Compute the sum. NOT implemented.
Definition: colValues.h:914
virtual array_t< unsigned char > * selectUBytes(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:1234
virtual double getSum() const
Compute the sum. NOT implemented.
Definition: colValues.h:839
A class to store signed 64-bit integer values.
Definition: colValues.h:245
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:3934
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:4079
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:599
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: am.cpp:50
Arbitrary null-terminated strings.
Definition: table.h:51
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:765
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:395
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:221
A functor for formatting unix time using the user supplied format.
Definition: column.h:358
const ibis::column * operator->() const
Provide a pointer to the column containing the selected values.
Definition: colValues.h:26
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:396
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4419
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:328
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:4007
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:288
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:424
!< Two-byte signed integers, internally int16_t.
Definition: table.h:33
!< Eight-byte signed integers, internally int64_t.
Definition: table.h:37
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.cpp:7060
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:397
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)=0
Sort rows in the range [i, j).
A class to store integer values.
Definition: colValues.h:110
!< One-byte unsigned integers, internally unsigned char.
Definition: table.h:32
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:217
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:805
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:2391
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6906
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7271
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6929
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:696
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:562
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:191
A class to store unsigned short integer values.
Definition: colValues.h:449
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7307
virtual void reduce(const array_t< uint32_t > &)
remove the duplicate elements according to the array starts
Definition: colValues.cpp:4526
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:531
!< Four-byte IEEE floating-point numbers, internally float.
Definition: table.h:39
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:126
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:601
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:806
virtual void sort(uint32_t, uint32_t, bundle *)
Sort rows in the range [i, j).
Definition: colValues.cpp:3553
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:219
TYPE_T
Supported data types.
Definition: table.h:25
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:630
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7187
void reorder(array_t< T > &arr, const array_t< uint32_t > &ind)
Reorder the array arr according to the indices given in ind.
Definition: utilidor.cpp:224
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:125
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7223
A class to store unsigned 64-bit integer values.
Definition: colValues.h:585
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:190
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Find positions of the k smallest strings.
Definition: colValues.cpp:7182
virtual array_t< int64_t > * selectLongs(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:2483
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:490
virtual double getMin() const
Compute the minimum. NOT implemented.
Definition: colValues.h:835
virtual array_t< int32_t > * selectInts(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:1833
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:767
virtual long write(FILE *fptr) const
Write out the whole array as binary.
Definition: colValues.cpp:6760
virtual uint64_t getULong(uint32_t) const
Return the ith value as unsigned long. NOT implemented.
Definition: colValues.h:847
virtual std::vector< std::string > * selectStrings(const bitvector &mask) const
Return the selected rows as strings.
Definition: column.cpp:5276
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:259
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:494
A class to store double precision floating-point values.
Definition: colValues.h:721
A class to store signed 8-bit integer values.
Definition: colValues.h:517
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4475
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:4225
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6843
virtual ibis::TYPE_T getType() const =0
Return the type of the data stored.
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Mark the start positions of the segments with identical values.
Definition: am.cpp:2
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4405
virtual void reorder(const array_t< uint32_t > &ind)=0
Reorder the values according to the specified indices.
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4377
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7247
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7259
AGREGADO
Functions related to internal aggregation operations.
Definition: selectClause.h:164
A data structure to represent a sequence of bits.
Definition: bitvector.h:62
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:463
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const =0
Produce an array of the starting positions of values that are the same.
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:354
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:329
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:667
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6734
A class to store raw binary values.
Definition: colValues.h:866
virtual uint32_t getUInt(uint32_t) const
Return the ith value as unsigned int. NOT implemented.
Definition: colValues.h:918
!< One-byte signed integers, internally char.
Definition: table.h:31
virtual void reduce(const array_t< uint32_t > &starts)
remove the duplicate elements according to the array starts
Definition: colValues.cpp:4503
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:881
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:2819
virtual double getDouble(uint32_t) const
Return the ith value as double. NOT implemented.
Definition: colValues.h:851
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:356
A class to store unsigned integer values.
Definition: colValues.h:178
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:4298
virtual float getFloat(uint32_t) const
Return the ith value as float. NOT implemented.
Definition: colValues.h:924
virtual ibis::TYPE_T getType() const
Return the type of the data stored.
Definition: colValues.h:124
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7283
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:358
A pure virtual base class for storing selected values in memory.
Definition: colValues.h:14
virtual uint64_t getULong(uint32_t) const
Return the ith value as unsigned long. NOT implemented.
Definition: colValues.h:922
virtual void reduce(const array_t< uint32_t > &starts)
remove the duplicate elements according to the array starts
Definition: colValues.cpp:4517
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:1107
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:668
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const =0
Return the positions of the k smallest elements.
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:532
virtual long write(FILE *fptr) const
Write out whole array as binary.
Definition: colValues.cpp:6797
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:3016
void setTimeFormat(const char *, const char *=0)
Add a custom format for the column to be interpretted as unix time stamps.
Definition: colValues.cpp:137
!< Four-byte unsigned integers, internally uint32_t.
Definition: table.h:36
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:192
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:261
virtual long truncate(uint32_t keep)
Truncate the number element to no more than keep.
Definition: colValues.cpp:7235
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.cpp:7176
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:1963
static colValues * create(const ibis::column *c)
Implementation of the colValues class hierarchy.
Definition: colValues.cpp:25
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:694
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:465
virtual void sort(uint32_t i, uint32_t j, bundle *bdl)
Sort rows in the range [i, j).
Definition: colValues.cpp:2177
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:737
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:738
virtual void reorder(const array_t< uint32_t > &ind)
Reorder the values according to the specified indices.
Definition: colValues.h:626
virtual array_t< int16_t > * selectShorts(const bitvector &mask) const
Return selected rows of the column in an array_t object.
Definition: column.cpp:1353
virtual float getFloat(uint32_t) const
Return the ith value as float. NOT implemented.
Definition: colValues.h:849
Define the class ibis::column.
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4461
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:426
virtual void bottomk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k smallest elements.
Definition: colValues.h:290
virtual void * getArray() const
Return the pointer to the pointer to underlying array_t object.
Definition: colValues.h:880
A class to store short integer values.
Definition: colValues.h:381
virtual void nosharing()
Make sure the content of the underlying storage is not shared.
Definition: colValues.h:533
virtual void topk(uint32_t k, array_t< uint32_t > &ind) const
Return the positions of the k largest elements.
Definition: colValues.h:153
virtual array_t< uint32_t > * segment(const array_t< uint32_t > *old=0) const
Produce an array of the starting positions of values that are the same.
Definition: colValues.cpp:3862
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4391
virtual void reduce(const array_t< uint32_t > &starts)
Remove the duplicate elements according to the array starts.
Definition: colValues.cpp:4489
virtual void nosharing()=0
Make sure the content of the underlying storage is not shared.
A class to store single precision float-point values.
Definition: colValues.h:653