Public Member Functions
ibis::sbiad Class Reference

The multicomponent interval encoded index. More...

#include <irelic.h>

Inheritance diagram for ibis::sbiad:
ibis::fade ibis::relic ibis::index

List of all members.

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::qDiscreteRange &expr, ibis::bitvector &hits) const
 Resolve a discrete range condition.
virtual long evaluate (const ibis::qContinuousRange &expr, ibis::bitvector &hits) const
 Compute the hits as a bitvector.
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.
 sbiad (const ibis::column *c=0, const char *f=0, const uint32_t nbase=2)
 Constructor.
 sbiad (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8)
 Reconstruct an index from 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 this index to a file.

Detailed Description

The multicomponent interval encoded index.

Defined by Chan and Ioannidis (SIGMOD 99).


Constructor & Destructor Documentation

ibis::sbiad::sbiad ( const ibis::column c = 0,
const char *  f = 0,
const uint32_t  nbase = 2 
)

Constructor.

If an index exists in the specified location, it will be read, otherwise a new bitmap index will be created from current data.

References ibis::index::bits, ibis::fade::clear(), ibis::index::col, ibis::gVerbose, ibis::column::name(), ibis::part::name(), ibis::index::nrows, ibis::part::nRows(), print(), and ibis::array_t< T >::size().

ibis::sbiad::sbiad ( const ibis::column c,
ibis::fileManager::storage st,
size_t  start = 8 
)

Reconstruct an index from a storage object.

The content of the file (following the 8-byte header) is as follows:

    nrows(uint32_t)         -- the number of bits in 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::column::name(), ibis::part::name(), ibis::index::nrows, print(), and ibis::array_t< T >::size().


Member Function Documentation

long ibis::sbiad::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.

long ibis::sbiad::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::bitvector::size(), and ibis::array_t< T >::size().

virtual const char* ibis::sbiad::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::sbiad::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::fade.

References ibis::fileManager::flushFile(), ibis::gVerbose, ibis::fileManager::instance(), ibis::index::SBIAD, UnixOpen, ibis::fade::write32(), and ibis::fade::write64().


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