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

Directly use the integer values as bin number to avoid some intemdiate steps. More...

#include <idirekte.h>

Inheritance diagram for ibis::direkte:
ibis::index

List of all members.

Public Member Functions

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
 direkte (const ibis::column *c, const char *f=0)
 Constructing a new ibis::direkte object from base data in a file.
 direkte (const ibis::column *c, ibis::fileManager::storage *st)
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 void estimate (const ibis::qDiscreteRange &expr, ibis::bitvector &lower, ibis::bitvector &upper) const
 Estimate the hits for discrete ranges, i.e., those translated from 'a IN (x, y, ..)'.
virtual uint32_t estimate (const ibis::qContinuousRange &expr) const
 Returns an upper bound on the number of hits.
virtual uint32_t estimate (const ibis::qDiscreteRange &expr) const
virtual double estimateCost (const ibis::qContinuousRange &expr) const
 Estimate the code of evaluate a range condition.
virtual double estimateCost (const ibis::qDiscreteRange &expr) const
virtual long evaluate (const ibis::qContinuousRange &expr, ibis::bitvector &hits) const
 To evaluate the exact hits.
virtual long evaluate (const ibis::qDiscreteRange &expr, ibis::bitvector &hits) const
 To evaluate the exact hits.
virtual long getCumulativeDistribution (std::vector< double > &bds, std::vector< uint32_t > &cts) const
 Cumulative distribution of the data.
virtual long getDistribution (std::vector< double > &bbs, std::vector< uint32_t > &cts) const
 Binned distribution of the data.
virtual double getMax () const
 The maximum value recorded in the index.
virtual double getMin () const
 The minimum value recorded in the index.
virtual double getSum () const
 Compute the approximate sum of all the values 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 (ibis::fileManager::storage *st)
 Reconstruct an index from a piece of consecutive memory.
virtual int read (const char *name)
 Read index from the specified location.
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::qDiscreteRange &expr, ibis::bitvector &iffy) const
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 *name) const
 Write the direct bitmap index to a file.

Protected Member Functions

template<typename T >
int construct (const char *f)
 direkte (const direkte &)
virtual size_t getSerialSize () const throw ()
 Estiamte the size of the index file.
void locate (const ibis::qContinuousRange &expr, uint32_t &hit0, uint32_t &hit1) const
direkteoperator= (const direkte &)

Detailed Description

Directly use the integer values as bin number to avoid some intemdiate steps.


Member Function Documentation

long ibis::direkte::append ( const char *  dt,
const char *  df,
uint32_t  nnew 
) [virtual]
void ibis::direkte::binBoundaries ( std::vector< double > &  ) const [virtual]

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

Reimplemented from ibis::index.

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

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

Parameters:
exprthe query expression to be evaluated.
lowera bitvector marking a subset of the hits. All rows marked with one (1) are definitely hits.
uppera 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::index.

References ibis::bitvector::clear().

void ibis::direkte::estimate ( const ibis::qDiscreteRange expr,
ibis::bitvector lower,
ibis::bitvector upper 
) const [virtual]

Estimate the hits for discrete ranges, i.e., those translated from 'a IN (x, y, ..)'.

A trivial implementation to indicate the index can not determine any row.

Reimplemented from ibis::index.

References ibis::bitvector::clear(), ibis::qDiscreteRange::getValues(), ibis::bitvector::set(), and ibis::array_t< T >::size().

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

Implements ibis::index.

References ibis::bitvector::cnt().

long ibis::direkte::evaluate ( const ibis::qDiscreteRange ,
ibis::bitvector  
) const [virtual]

To evaluate the exact hits.

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

Reimplemented from ibis::index.

References ibis::bitvector::cnt(), ibis::qDiscreteRange::getValues(), ibis::bitvector::set(), and ibis::array_t< T >::size().

long ibis::direkte::getCumulativeDistribution ( std::vector< double > &  bds,
std::vector< uint32_t > &  cts 
) const [virtual]

Cumulative distribution of the data.

A brute-force approach to get an accurate cumulative distribution.

Reimplemented from ibis::index.

long ibis::direkte::getDistribution ( std::vector< double > &  bbs,
std::vector< uint32_t > &  cts 
) const [virtual]

Binned distribution of the data.

A brute-force approach to get an accurate distribution.

Reimplemented from ibis::index.

size_t ibis::direkte::getSerialSize ( ) const throw () [protected, virtual]

Estiamte the size of the index file.

The index file contains primarily the bitmaps.

double ibis::direkte::getSum ( ) const [virtual]

Compute the approximate sum of all the values indexed.

If it decides that computing the sum directly from the vertical partition is more efficient, it will return NaN immediately.

Reimplemented from ibis::index.

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

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

Implements ibis::index.

virtual float ibis::direkte::undecidable ( const ibis::qContinuousRange ,
ibis::bitvector  
) const [inline, virtual]

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

Parameters:
exprthe range conditions to be evaluated.
iffythe 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::index.

References ibis::bitvector::clear().


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