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

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

#include <irelic.h>

Inheritance diagram for ibis::zona:
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 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 cost of resolving the continuous range expression.
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.
virtual int read (const char *idxfile)
 Read an index from the specified location.
virtual int read (ibis::fileManager::storage *st)
 Reconstruct an index from a piece of consecutive memory.
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.
 zona (const ibis::column *c=0, const char *f=0)
 zona (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8)
 Reconstruct from content of fileManager::storage.

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 equality-equality index.

Note:
Zona is Italian word for zone, the name of the binned version of the two-level equality-equality code.

Constructor & Destructor Documentation

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

Reconstruct from content of fileManager::storage.

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,

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

References ibis::fileManager::storage::begin(), ibis::index::bits, clear(), ibis::index::col, ibis::gVerbose, ibis::part::name(), ibis::column::name(), 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

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

References ibis::relic::append(), and ibis::util::coarsen().

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

Clear the existing content.

Free the objectes pointed to by the pointers.

Reimplemented from ibis::relic.

References ibis::util::clear().

Referenced by zona().

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

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

Reimplemented from ibis::relic.

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

Estimate the cost of resolving the continuous range expression.

The answer is in the number of bytes needed from this index.

Reimplemented from ibis::relic.

virtual const char* ibis::zona::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::zona::read ( const char *  f) [virtual]

Read an index from the specified location.

The incoming 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::util::clear(), ibis::gVerbose, ibis::fileManager::instance(), ibis::fileManager::recordPages(), ibis::util::strnewdup(), and UnixOpen.

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

Write the content of the 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::fileManager::flushFile(), ibis::gVerbose, ibis::fileManager::instance(), ibis::index::RELIC, UnixOpen, ibis::relic::write32(), ibis::relic::write64(), and ibis::index::ZONA.


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