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

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

#include <irelic.h>

Inheritance diagram for ibis::fuzz:
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.
 fuzz (const ibis::column *c=0, const char *f=0)
 fuzz (const ibis::column *c, ibis::fileManager::storage *st, size_t start=8)
 Reconstruct an index from the content of a storage object.
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 storage object.
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.

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 two-level interval-equality index.

Note:
In fuzzy classification / clustering, many interval equality conditions are used. Hence the crazy name.

Constructor & Destructor Documentation

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

Reconstruct an index from the content of a storage object.

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::fuzz::writeCoarse.
   nc      (uint32_t)                   -- number of coarse bins.
   cbounds (uint32_t[nc+1])             -- boundaries of the coarse bins.
   coffsets([nc-ceil(nc/2)+2])          -- starting positions.
   cbits   (bitvector[nc-ceil(nc/2)+1]) -- bitvectors.

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


Member Function Documentation

long ibis::fuzz::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::fuzz::clear ( ) [protected, virtual]

Clear the existing content.

Free the objectes pointed to by the pointers.

Reimplemented from ibis::relic.

References ibis::relic::clear().

Referenced by fuzz().

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

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

Reimplemented from ibis::relic.

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

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

Write the content of the index to 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::fileManager::flushFile(), ibis::index::FUZZ, 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