The multicomponent equality 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 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. | |
| 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. | |
| sapid (const ibis::column *c=0, const char *f=0, const uint32_t nbase=2) | |
| Constructor. | |
| sapid (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8) | |
| Reconstruct an index from the content of a storage object. | |
| 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 the index to the specified location. | |
The multicomponent equality encoded index.
| ibis::sapid::sapid | ( | const ibis::column * | c = 0, |
| const char * | f = 0, |
||
| const uint32_t | nbase = 2 |
||
| ) |
Constructor.
If a bitmap index is present in the specified location, its header will be read into memory, otherwise a new bitmap index is created from current data.
References ibis::index::bits, ibis::fade::clear(), ibis::index::col, ibis::gVerbose, ibis::part::name(), ibis::column::name(), ibis::part::nRows(), ibis::index::nrows, print(), and ibis::array_t< T >::size().
| ibis::sapid::sapid | ( | const ibis::column * | c, |
| ibis::fileManager::storage * | st, | ||
| size_t | start = 8 |
||
| ) |
Reconstruct an index from the content of a storage object.
The content of the file (following the 8-byte header) is
nrows(uint32_t) -- the number of bits of a bit sequence nobs (uint32_t) -- the number of bit sequences card (uint32_t) -- the number of distinct values, i.e., cardinality (padding to ensure the next data element is on 8-byte boundary) values (double[card]) -- the distinct values as doubles offset([nobs+1]) -- the starting positions of the bit sequences (as bit vectors) nbases(uint32_t) -- the number of components (bases) used cnts (uint32_t[card]) -- the counts for each distinct value bases(uint32_t[nbases]) -- the bases sizes bitvectors -- the bitvectors one after another
References ibis::index::bits, ibis::index::col, ibis::gVerbose, ibis::part::name(), ibis::column::name(), ibis::index::nrows, print(), and ibis::array_t< T >::size().
| long ibis::sapid::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::fade.
References ibis::util::clear().
| long ibis::sapid::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::fade.
References ibis::bitvector::cnt(), ibis::qDiscreteRange::getValues(), ibis::bitvector::set(), ibis::array_t< T >::size(), and ibis::bitvector::size().
| virtual const char* ibis::sapid::name | ( | ) | const [inline, virtual] |
Returns the name of the index, similar to the function type, but returns a string instead.
Reimplemented from ibis::fade.
| int ibis::sapid::write | ( | const char * | dt | ) | const [virtual] |
Write the content of the index to the specified location.
The argument is the name of a directory or a file name. It is used by the function indexFileName to determine the actual index file name.
Reimplemented from ibis::fade.
References ibis::fileManager::flushFile(), ibis::gVerbose, ibis::fileManager::instance(), ibis::index::SAPID, UnixOpen, ibis::fade::write32(), and ibis::fade::write64().
|
| |