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. | |
| 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 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). | |
| virtual void | sort (uint32_t i, uint32_t j, array_t< uint32_t > &neworder) const =0 |
Sort rows in the range [i, j). | |
| 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, 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). | |
| static colValues * | create (const ibis::column *c) |
| Construct from content of an array_t. | |
Protected Member Functions | |
| colValues (const ibis::column *c) | |
Protected Attributes | |
| const ibis::column * | col |
| The column where the value is from. | |
A pure virtual base class for storing selected values in memory.
| ibis::colValues * ibis::colValues::create | ( | const ibis::column * | c, |
| const ibis::bitvector & | hits | ||
| ) | [static] |
Construct from a hit vector.
Implementation of the colValues class hierarchy.
References ibis::BYTE, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::gVerbose, ibis::INT, ibis::LONG, ibis::SHORT, ibis::TEXT, ibis::column::type(), ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
| ibis::colValues * ibis::colValues::create | ( | const ibis::column * | c, |
| ibis::fileManager::storage * | store, | ||
| const uint32_t | start, | ||
| const uint32_t | end | ||
| ) | [static] |
Construct from content of the file (pointed by store).
Use values stored in the storage object.
References ibis::BYTE, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::gVerbose, ibis::INT, ibis::LONG, ibis::SHORT, ibis::column::type(), ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
| ibis::colValues * ibis::colValues::create | ( | const ibis::column * | c | ) | [static] |
Construct from content of an array_t.
Use all rows of the column.
References ibis::BYTE, ibis::CATEGORY, ibis::DOUBLE, ibis::FLOAT, ibis::gVerbose, ibis::INT, ibis::LONG, ibis::SHORT, ibis::TEXT, ibis::column::type(), ibis::TYPESTRING, ibis::UBYTE, ibis::UINT, ibis::ULONG, and ibis::USHORT.
| virtual void ibis::colValues::reorder | ( | const array_t< uint32_t > & | ind | ) | [pure virtual] |
Reorder the values according to the specified indices.
New[i] = Old[ind[i]].
Implemented in ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
| virtual array_t<uint32_t>* ibis::colValues::segment | ( | const array_t< uint32_t > * | old = 0 | ) | const [pure virtual] |
Produce an array of the starting positions of values that are the same.
Implemented in ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
| virtual void ibis::colValues::sort | ( | uint32_t | i, |
| uint32_t | j, | ||
| bundle * | bdl, | ||
| colList::iterator | head, | ||
| colList::iterator | tail | ||
| ) | [pure virtual] |
Sort rows in the range [i, j).
Also sort the columns between [head, tail).
Implemented in ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
| virtual void ibis::colValues::sort | ( | uint32_t | i, |
| uint32_t | j, | ||
| array_t< uint32_t > & | neworder | ||
| ) | const [pure virtual] |
Sort rows in the range [i, j).
Output the new order in array neworder.
Implemented in ibis::colStrings, ibis::colDoubles, ibis::colFloats, ibis::colUBytes, ibis::colBytes, ibis::colUShorts, ibis::colShorts, ibis::colULongs, ibis::colLongs, ibis::colUInts, and ibis::colInts.
|
| |