Public Member Functions | Protected Member Functions
ibis::bylt Class Reference

The precise version of the two-level range-equality index. More...

#include <irelic.h>

Inheritance diagram for ibis::bylt:
ibis::relic ibis::index

List of all members.

Public Member Functions

virtual long append (const char *dt, const char *df, uint32_t nnew)
 Extend the index with the data from df.
 bylt (const ibis::column *c=0, const char *f=0)
 bylt (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8)
 Reconstruct an index from content of a storage objecta.
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 I/O cost needed to evaluate the given 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
 Print function.
virtual int read (const char *idxfile)
 Read the index contained in the file f.
virtual int read (ibis::fileManager::storage *st)
 Reconstruct an index from a storage object.
virtual INDEX_TYPE type () const
 Returns an index type identifier.
virtual int write (const char *dt) const
 Write the content of index to the specified location.

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.

Detailed Description

The precise version of the two-level range-equality index.

Note:
Bylt is Danish word for pack, the name of the binned version of the two-level range-equality code.

Constructor & Destructor Documentation

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

Reconstruct an index from content of a storage objecta.

The leading portion of the index file is the same as ibis::relic, which allows the constructor of the base class to work properly. The content following the last bitvector in ibis::relic is as follows:

   nc      (uint32_t)       -- number of coarse bins.
   cbounds (unsigned[nc+1]) -- boundaries of the coarse bins.
   coffsets(int32_t[nc+1])  -- starting position of the coarse level bitmaps.
   cbits   (bitvector[nc])  -- bitvector laid out one after another.
See also:
ibis::bylt::writeCoarse

References ibis::fileManager::storage::begin(), ibis::index::bits, ibis::array_t< T >::clear(), clear(), ibis::index::col, ibis::gVerbose, ibis::part::name(), ibis::column::name(), ibis::index::nrows, ibis::index::offset32, ibis::index::offset64, print(), ibis::array_t< T >::resize(), ibis::array_t< T >::size(), ibis::fileManager::storage::size(), and ibis::array_t< T >::swap().


Member Function Documentation

uint32_t ibis::bylt::estimate ( const ibis::qContinuousRange expr) const [virtual]

Return the number of hits satisfying the given continuous range expression.

Reimplemented from ibis::relic.

double ibis::bylt::estimateCost ( const ibis::qContinuousRange expr) const [virtual]

Estimate the I/O cost needed to evaluate the given range condition.

This function examines all combinations of using the two levels of indexes and return the minimal cost.

Reimplemented from ibis::relic.

References ibis::gVerbose.

long ibis::bylt::evaluate ( const ibis::qContinuousRange expr,
ibis::bitvector lower 
) const [virtual]

Compute the hits as a bitvector.

This function attempts to use the coarse bins only if the sizes of the coarse bitmaps are known. If the coarse bitmaps are of known sizes, all combinations of coarse bins and fine bins are considered.

Reimplemented from ibis::relic.

References ibis::bitvector::cnt(), ibis::bitvector::copy(), ibis::gVerbose, and ibis::bitvector::set().

virtual const char* ibis::bylt::name ( ) const [inline, virtual]

Returns the name of the index, similar to the function type, but returns a string instead.

Reimplemented from ibis::relic.

int ibis::bylt::write ( const char *  dt) const [virtual]

Write the content of index to the specified location.

The argument can be the name of a directory or a file. The actual index file name is determined by the function indexFileName.

Reimplemented from ibis::relic.

References ibis::index::BYLT, ibis::fileManager::flushFile(), ibis::gVerbose, ibis::fileManager::instance(), ibis::index::RELIC, UnixOpen, ibis::relic::write32(), and ibis::relic::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