ibis::pale Class Reference

A two-level index. More...

#include <ibin.h>

Inheritance diagram for ibis::pale:

ibis::bin ibis::index

List of all members.

Public Member Functions

virtual void adjustLength (uint32_t nrows)
long append (const ibis::pale &tail)
virtual long append (const char *dt, const char *df, uint32_t nnew)
 Extend the index.
virtual void binBoundaries (std::vector< double > &) const
 The function binBoundaries and binWeights return bin boundaries and counts of each bin respectively.
virtual void binWeights (std::vector< uint32_t > &) const
virtual void estimate (const ibis::qContinuousRange &expr, ibis::bitvector &lower, ibis::bitvector &upper) const
 Computes an approximation of hits as a pair of lower and upper bounds.
virtual long evaluate (const ibis::qContinuousRange &expr, ibis::bitvector &hits) const
 To evaluate the exact hits.
virtual const char * name () const
 Returns the name of the index, similar to the function type, but returns a string instead.
virtual uint32_t numBins () const
 pale (const ibis::bin &rhs)
 pale (const ibis::column *c, ibis::fileManager::storage *st, uint32_t offset=8)
virtual void print (std::ostream &out) const
 Prints human readable information.
virtual int read (ibis::fileManager::storage *st)
 Reconstructs an index from an array of bytes.
virtual int read (const char *idxfile)
 Reconstructs an index from the named file.
virtual void speedTest (std::ostream &out) const
 Time some logical operations and print out their speed.
virtual INDEX_TYPE type () const
 Returns an index type identifier.
virtual float undecidable (const ibis::qContinuousRange &expr, ibis::bitvector &iffy) const
 Mark the position of the rows that can not be decided with this index.
virtual int write (const char *dt) const
 Save index to a file.

Protected Member Functions

virtual void clear ()
 Clear the existing content.


Detailed Description

A two-level index.

Coarse level not cumulative, fine level is cumulative.


Member Function Documentation

void ibis::pale::binBoundaries ( std::vector< double > &   )  const [virtual]

The function binBoundaries and binWeights return bin boundaries and counts of each bin respectively.

Reimplemented from ibis::bin.

References ibis::bin::bounds.

void ibis::pale::clear (  )  [protected, virtual]

Clear the existing content.

Free the objectes pointed to by the pointers.

Reimplemented from ibis::bin.

References ibis::bin::clear().

Referenced by read().

void ibis::pale::estimate ( const ibis::qContinuousRange expr,
ibis::bitvector lower,
ibis::bitvector upper 
) const [virtual]

Computes an approximation of hits as a pair of lower and upper bounds.

Parameters:
expr the query expression to be evaluated.
lower a bitvector marking a subset of the hits. All rows marked with one (1) are definitely hits.
upper a bitvector marking a superset of the hits. All hits are marked with one, but some of the rows marked one may not be hits. If the variable upper is empty, the variable lower is assumed to contain the exact answer.

Reimplemented from ibis::bin.

References ibis::index::activate(), ibis::index::bits, ibis::bin::bounds, ibis::bitvector::clear(), ibis::index::col, ibis::bitvector::copy(), ibis::gVerbose, ibis::qContinuousRange::leftBound(), ibis::qContinuousRange::leftOperator(), ibis::column::logWarning(), ibis::bin::maxval, ibis::bin::minval, ibis::qContinuousRange::rightBound(), ibis::qContinuousRange::rightOperator(), ibis::bitvector::set(), and ibis::index::sumBins().

Referenced by evaluate(), and undecidable().

long ibis::pale::evaluate ( const ibis::qContinuousRange expr,
ibis::bitvector hits 
) const [virtual]

To evaluate the exact hits.

On success, return the number of hits, otherwise a negative value is returned.

Reimplemented from ibis::bin.

References ibis::bitvector::cnt(), ibis::index::col, ibis::part::doScan(), estimate(), ibis::column::partition(), and ibis::bitvector::size().

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

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

Reimplemented from ibis::bin.

Referenced by read().

void ibis::pale::print ( std::ostream &  out  )  const [virtual]

Prints human readable information.

Outputs information about the index as text to the specified output stream.

Reimplemented from ibis::bin.

References ibis::index::bits, ibis::bin::bounds, ibis::index::col, ibis::gVerbose, ibis::bin::maxval, ibis::bin::minval, ibis::column::name(), ibis::part::name(), and ibis::column::partition().

int ibis::pale::read ( ibis::fileManager::storage st  )  [virtual]

int ibis::pale::read ( const char *  name  )  [virtual]

float ibis::pale::undecidable ( const ibis::qContinuousRange expr,
ibis::bitvector iffy 
) const [virtual]

Mark the position of the rows that can not be decided with this index.

Parameters:
expr the range conditions to be evaluated.
iffy the bitvector marking the positions of rows that can not be decided using the index. Return value is the expected fraction of undecided rows that might satisfy the range conditions.

Reimplemented from ibis::bin.

References ibis::bitvector::cnt(), estimate(), ibis::qContinuousRange::leftBound(), ibis::bin::maxval, ibis::bin::minval, ibis::qContinuousRange::rightBound(), ibis::bitvector::set(), and ibis::bitvector::size().

int ibis::pale::write ( const char *  name  )  const [virtual]

Save index to a file.

Outputs the index in a compact binary format to the named file or directory. The index file contains a header that can be identified by the function isIndex.

Reimplemented from ibis::bin.

References ibis::index::col, ibis::index::fname, ibis::gVerbose, ibis::index::indexFileName(), ibis::column::logWarning(), ibis::column::name(), ibis::part::name(), ibis::index::PALE, and ibis::column::partition().

Referenced by append().


The documentation for this class was generated from the following files:
Make It A Bit Faster
Disclaimers
FastBit source code
FastBit mailing list archive
Maintainer of this page