Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ibis::colValues Class Referenceabstract

A pure virtual base class for storing selected values in memory. More...

#include <colValues.h>

Inheritance diagram for ibis::colValues:
ibis::colBlobs ibis::colBytes ibis::colDoubles ibis::colFloats ibis::colInts ibis::colLongs ibis::colShorts ibis::colStrings ibis::colUBytes ibis::colUInts ibis::colULongs ibis::colUShorts

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::columncolumnPointer () 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::columnoperator-> () 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 colValuescreate (const ibis::column *c)
 Implementation of the colValues class hierarchy. More...
 
static colValuescreate (const ibis::column *c, const ibis::bitvector &hits)
 Construct from a hit vector.
 
static colValuescreate (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::columncol
 
ibis::column::unixTimeScribeutform
 !< The column where the value is from.
 

Detailed Description

A pure virtual base class for storing selected values in memory.

Member Function Documentation

ibis::colValues * ibis::colValues::create ( const ibis::column c)
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().

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::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.

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::colBlobs, 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
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::colBlobs, 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

The documentation for this class was generated from the following files:

Make It A Bit Faster
Contact us
Disclaimers
FastBit source code
FastBit mailing list archive