ibis::category Class Reference

A specialized low-cardinality text field. More...

#include <category.h>

Inheritance diagram for ibis::category:

ibis::text ibis::column

List of all members.

Public Member Functions

virtual long append (const char *dt, const char *df, const uint32_t nold, const uint32_t nnew, const uint32_t nbuf, char *buf)
 Append the content in df to the directory dt.
 category (const part *tbl, const char *name, const char *value, const char *dir=0, uint32_t nevt=0)
 category (const ibis::column &col)
 Copy constructor. Copy from a collumn object with KEY type.
 category (const part *tbl, const char *name)
 category (const part *tbl, FILE *file)
virtual double estimateCost (const ibis::qDiscreteRange &cmp) const
virtual double estimateCost (const ibis::qContinuousRange &cmp) const
 Estimate the cost of evaluate the query expression.
virtual double estimateCost (const ibis::qMultiString &cmp) const
virtual double estimateCost (const ibis::qString &cmp) const
virtual const char * getKey (uint32_t i) const
 Return the ith value in the dictionary.
virtual void getString (uint32_t i, std::string &val) const
 Return the string value for the ith row.
virtual const char * isKey (const char *str) const
 Is the given string one of the keys in the dictionary? Return a null pointer if not.
virtual void print (std::ostream &out) const
virtual long search (const std::vector< std::string > &vals) const
 Estimate the total number of matches for a list of strings.
virtual long search (const char *str) const
 Estimate the number of matches.
virtual long search (const std::vector< std::string > &vals, ibis::bitvector &hits) const
 Match a list of strings.
virtual long search (const char *str, ibis::bitvector &hits) const
 Match a particular string.
virtual array_t< uint32_t > * selectUInts (const bitvector &mask) const
 Return the integer values of the records marked 1 in the mask.
virtual void write (FILE *file) const
 Write the current content to the TDC file.


Detailed Description

A specialized low-cardinality text field.

It is also known as control values, or categorical values. This implementation directly converts string values into bitvectors (as ibis::relic), and does not store integer version of the string.

Note:
Value zero (0) is reserved for NULL values.

Member Function Documentation

virtual void ibis::category::getString ( uint32_t  i,
std::string &  val 
) const [inline, virtual]

Return the string value for the ith row.

Only valid for ibis::text and ibis::category. ibis::text

Reimplemented from ibis::text.

virtual const char* ibis::category::isKey ( const char *  str  )  const [inline, virtual]

Is the given string one of the keys in the dictionary? Return a null pointer if not.

References ibis::dictionary::find().


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