The multicomponent range-encoded index. More...
#include <irelic.h>
Public Member Functions | |
virtual long | append (const char *dt, const char *df, uint32_t nnew) |
Create an index based on data in df and append the result to the index in dt. | |
virtual void | binWeights (std::vector< uint32_t > &b) const |
Return the exact count for each distinct value. | |
virtual uint32_t | estimate (const ibis::qContinuousRange &expr) const |
Return the number of hits satisfying the given continuous range expression. | |
virtual double | estimateCost (const ibis::qContinuousRange &expr) const |
Estimate the cost of resolving the continuous range expression. | |
virtual long | evaluate (const ibis::qContinuousRange &expr, ibis::bitvector &hits) const |
Compute the hits as a bitvector . | |
virtual long | evaluate (const ibis::qDiscreteRange &expr, ibis::bitvector &hits) const |
Resolve a discrete range condition. | |
fade (const ibis::column *c=0, const char *f=0, const uint32_t nbase=2) | |
Construct a bitmap index from current data. | |
fade (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8) | |
Reconstruct from content of fileManager::storage. | |
virtual double | getSum () const |
Compute the sum of all values of the column indexed. | |
virtual const char * | name () const |
Returns the name of the index, similar to the function type , but returns a string instead. | |
virtual void | print (std::ostream &out) const |
The printing function. | |
virtual int | read (const char *idxfile) |
Read the index contained in the file named f . | |
virtual int | read (ibis::fileManager::storage *st) |
Reconstruct an index from a piece of consecutive memory. | |
virtual void | speedTest (std::ostream &out) const |
A simple function to test the speed of the bitvector operations. | |
virtual INDEX_TYPE | type () const |
Returns an index type identifier. | |
virtual int | write (const char *dt) const |
Write the content of this index to a file. | |
Protected Member Functions | |
virtual void | clear () |
Clear the existing content. | |
virtual size_t | getSerialSize () const throw () |
Estiamte the size of the index in a file. | |
int | write32 (int fdes) const |
Write the content to a file already opened. | |
int | write64 (int fdes) const |
Write the content to a file already opened. | |
Protected Attributes | |
array_t< uint32_t > | bases |
array_t< uint32_t > | cnts |
The multicomponent range-encoded index.
Defined by Chan and Ioannidis (SIGMOD 98).
ibis::fade::fade | ( | const ibis::column * | c, |
ibis::fileManager::storage * | st, | ||
size_t | start = 8 |
||
) |
Reconstruct from content of fileManager::storage.
The content of the file (following the 8-byte header) is
References ibis::fileManager::storage::begin(), ibis::index::bits, ibis::index::col, ibis::index::FADE, ibis::gVerbose, ibis::column::name(), ibis::part::name(), ibis::index::nrows, print(), ibis::array_t< T >::size(), and ibis::array_t< T >::swap().
long ibis::fade::append | ( | const char * | dt, |
const char * | df, | ||
uint32_t | nnew | ||
) | [virtual] |
Create an index based on data in df and append the result to the index in dt.
Reimplemented from ibis::relic.
Reimplemented in ibis::sbiad, and ibis::sapid.
void ibis::fade::clear | ( | ) | [protected, virtual] |
Clear the existing content.
Free the objectes pointed to by the pointers.
Reimplemented from ibis::relic.
References ibis::relic::clear().
Referenced by fade(), ibis::sapid::sapid(), and ibis::sbiad::sbiad().
uint32_t ibis::fade::estimate | ( | const ibis::qContinuousRange & | expr | ) | const [virtual] |
Return the number of hits satisfying the given continuous range expression.
Reimplemented from ibis::relic.
double ibis::fade::estimateCost | ( | const ibis::qContinuousRange & | expr | ) | const [virtual] |
Estimate the cost of resolving the continuous range expression.
The answer is in the number of bytes needed from this index.
Reimplemented from ibis::relic.
long ibis::fade::evaluate | ( | const ibis::qDiscreteRange & | expr, |
ibis::bitvector & | answer | ||
) | const [virtual] |
Resolve a discrete range condition.
The answer is a bitvector marking the rows satisfying the range conditions.
Reimplemented from ibis::relic.
Reimplemented in ibis::sbiad, and ibis::sapid.
References ibis::bitvector::cnt(), ibis::qDiscreteRange::getValues(), ibis::bitvector::set(), ibis::bitvector::size(), and ibis::array_t< T >::size().
virtual const char* ibis::fade::name | ( | ) | const [inline, virtual] |
Returns the name of the index, similar to the function type
, but returns a string instead.
Reimplemented from ibis::relic.
Reimplemented in ibis::sbiad, and ibis::sapid.
int ibis::fade::write | ( | const char * | dt | ) | const [virtual] |
Write the content of this index to a file.
The argument is the name of the directory or the index file name.
Reimplemented from ibis::relic.
Reimplemented in ibis::sbiad, and ibis::sapid.
References ibis::index::FADE, ibis::fileManager::flushFile(), ibis::gVerbose, ibis::fileManager::instance(), and UnixOpen.
![]() |