A pure virtual base class for storing selected values in memory. More...
#include <colValues.h>
Public Member Functions | |
virtual void | bottomk (uint32_t k, array_t< uint32_t > &ind) const =0 |
Return the positions of the k smallest elements. | |
bool | canSort () const |
const ibis::column * | columnPointer () const |
virtual uint32_t | elementSize () const =0 |
virtual bool | empty () const =0 |
virtual void | erase (uint32_t i, uint32_t j)=0 |
virtual void * | getArray () const =0 |
Return the pointer to the pointer to underlying array_t<T> object. | |
virtual double | getDouble (uint32_t) const =0 |
virtual float | getFloat (uint32_t) const =0 |
virtual int32_t | getInt (uint32_t) const =0 |
virtual int64_t | getLong (uint32_t) const =0 |
virtual double | getMax () const =0 |
virtual double | getMin () const =0 |
virtual double | getSum () const =0 |
virtual ibis::TYPE_T | getType () const =0 |
Return the type of the data stored. | |
virtual uint32_t | getUInt (uint32_t) const =0 |
virtual uint64_t | getULong (uint32_t) const =0 |
const char * | name () const |
Name. | |
virtual void | nosharing ()=0 |
Make sure the content of the underlying storage is not shared. | |
const ibis::column * | operator-> () const |
Provide a pointer to the column containing the selected values. | |
virtual void | reduce (const array_t< uint32_t > &starts)=0 |
virtual void | reduce (const array_t< uint32_t > &starts, ibis::selectClause::AGREGADO func)=0 |
virtual void | reorder (const array_t< uint32_t > &ind)=0 |
Reorder the values according to the specified indices. More... | |
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. More... | |
void | setTimeFormat (const char *, const char *=0) |
Add a custom format for the column to be interpretted as unix time stamps. | |
virtual uint32_t | size () const =0 |
virtual void | sort (uint32_t i, uint32_t j, bundle *bdl)=0 |
Sort rows in the range [i, j) . | |
virtual void | sort (uint32_t i, uint32_t j, bundle *bdl, colList::iterator head, colList::iterator tail)=0 |
Sort rows in the range [i, j) . More... | |
virtual void | sort (uint32_t i, uint32_t j, array_t< uint32_t > &neworder) const =0 |
Sort rows in the range [i, j) . More... | |
virtual void | swap (uint32_t i, uint32_t j)=0 |
void | swap (colValues &rhs) |
virtual void | topk (uint32_t k, array_t< uint32_t > &ind) const =0 |
Return the positions of the k largest elements. | |
virtual long | truncate (uint32_t keep)=0 |
Truncate the number element to no more than keep . | |
virtual long | truncate (uint32_t keep, uint32_t start)=0 |
Truncate the number element to no more than keep . | |
virtual long | write (FILE *fptr) const =0 |
Write out whole array as binary. | |
virtual void | write (std::ostream &out, uint32_t i) const =0 |
Write ith element as text. | |
Static Public Member Functions | |
static colValues * | create (const ibis::column *c) |
Implementation of the colValues class hierarchy. More... | |
static colValues * | create (const ibis::column *c, const ibis::bitvector &hits) |
Construct from a hit vector. | |
static colValues * | create (const ibis::column *c, ibis::fileManager::storage *store, const uint32_t start, const uint32_t end) |
Construct from content of the file (pointed by store ). More... | |
Protected Member Functions | |
colValues (const ibis::column *c) | |
Protected Attributes | |
const ibis::column * | col |
ibis::column::unixTimeScribe * | utform |
!< The column where the value is from. | |
A pure virtual base class for storing selected values in memory.
|
static |
Implementation of the colValues class hierarchy.
Construct a colValue object. Use all rows of the column.
References ibis::BLOB, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::INT, ibis::LONG, ibis::SHORT, ibis::TEXT, ibis::column::type(), ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
Referenced by ibis::bundle1::bundle1(), and ibis::bundles::bundles().
|
static |
Construct from content of the file (pointed by store
).
Use values stored in the storage object.
References ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::INT, ibis::LONG, ibis::SHORT, ibis::column::type(), ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
|
pure virtual |
Reorder the values according to the specified indices.
New[i] = Old[ind[i]]
.
Implemented in ibis::colBlobs, ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
|
pure virtual |
Produce an array of the starting positions of values that are the same.
Implemented in ibis::colBlobs, ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
|
pure virtual |
Sort rows in the range [i, j)
.
Also sort the columns between [head, tail)
.
Implemented in ibis::colBlobs, ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
|
pure virtual |
Sort rows in the range [i, j)
.
Output the new order in array neworder
.
Implemented in ibis::colBlobs, ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.