20 virtual const char*
name()
const {
return "direct";}
57 virtual void print(std::ostream& out)
const;
58 virtual void serialSizes(uint64_t&, uint64_t&, uint64_t&)
const;
62 virtual int write(
const char*
name)
const;
66 virtual long append(
const char* dt,
const char* df, uint32_t nnew);
80 virtual void binWeights(std::vector<uint32_t>&)
const;
82 virtual double getMin()
const {
return 0.0;}
84 virtual double getSum()
const;
86 (std::vector<double>& bds, std::vector<uint32_t>& cts)
const;
88 (std::vector<double>& bbs, std::vector<uint32_t>& cts)
const;
92 direkte(
const direkte &rhs) :
index(rhs) {};
95 direkte(
const ibis::column* c, uint32_t popu, uint32_t ntpl=0);
100 int construct(
const char* f);
101 template <
typename T>
102 int construct0(
const char* f);
105 uint32_t& hit0, uint32_t& hit1)
const;
109 direkte& operator=(const direkte&);
virtual double getSum() const
Compute the approximate sum of all the values indexed.
Definition: idirekte.cpp:1757
virtual size_t getSerialSize() const
Estimate the size of the index file.
Definition: idirekte.cpp:1816
void ints(array_t< uint32_t > &) const
Convert the bitvector into integer values.
Definition: idirekte.cpp:1016
size_t size() const
Definition: array_t.h:69
Definition of the common functions of an index.
virtual int write(ibis::array_t< double > &, ibis::array_t< int64_t > &, ibis::array_t< uint32_t > &) const
Save index to three arrays. Serialize the index in memory.
Definition: idirekte.cpp:786
Simple range condition.
Definition: qExpr.h:252
The storage class treats all memory as char*.
Definition: fileManager.h:237
array_t< ibis::bitvector * > bits
A list of bitvectors.
Definition: index.h:414
virtual void estimate(const ibis::qContinuousRange &, ibis::bitvector &lower, ibis::bitvector &upper) const
Computes an approximation of hits as a pair of lower and upper bounds.
Definition: index.h:191
The class to represent a column of a data partition.
Definition: column.h:65
virtual long evaluate(const ibis::qContinuousRange &expr, ibis::bitvector &hits) const =0
To evaluate the exact hits.
virtual long evaluate(const ibis::qContinuousRange &expr, ibis::bitvector &hits) const
To evaluate the exact hits.
Definition: idirekte.cpp:1356
virtual long getDistribution(std::vector< double > &bbs, std::vector< uint32_t > &cts) const
Binned distribution of the data.
Definition: idirekte.cpp:1800
virtual long select(const ibis::qContinuousRange &, void *) const
Evaluate the range condition and select values.
Definition: idirekte.h:51
virtual long select(const ibis::qContinuousRange &, void *, ibis::bitvector &) const
Evaluate the range condition, select values, and record the positions.
Definition: idirekte.h:53
virtual double estimateCost(const ibis::qContinuousRange &expr) const
Estimate the cost of evaluating a range condition.
Definition: idirekte.cpp:1432
The base index class.
Definition: index.h:82
virtual long getCumulativeDistribution(std::vector< double > &bds, std::vector< uint32_t > &cts) const
Cumulative distribution of the data.
Definition: idirekte.cpp:1785
virtual void clear()
Clear the existing content.
Definition: index.cpp:1313
virtual INDEX_TYPE type() const
Returns an index type identifier.
Definition: idirekte.h:19
INDEX_TYPE
The integer values of this enum type are used in the index files to differentiate the indexes...
Definition: index.h:86
virtual index * dup() const
Duplicate the content of an index object.
Definition: idirekte.cpp:198
virtual void speedTest(std::ostream &out) const
Time some logical operations and print out their speed.
Definition: idirekte.h:77
virtual void print(std::ostream &out) const
The printing function.
Definition: idirekte.cpp:581
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.
Definition: idirekte.cpp:1364
virtual void serialSizes(uint64_t &, uint64_t &, uint64_t &) const
Compute the size of arrays that would be generated by the serializatioin function (write)...
Definition: idirekte.cpp:812
virtual double getMax() const
The maximum value recorded in the index.
Definition: idirekte.h:83
int remapKeys(const ibis::array_t< uint32_t > &)
Change the key values to a new set of numbers.
Definition: idirekte.cpp:958
virtual int read(const char *name)
Read index from the specified location.
Definition: idirekte.cpp:833
virtual const char * name() const
Returns the name of the index, similar to the function type, but returns a string instead...
Definition: idirekte.h:20
A data structure to represent a sequence of bits.
Definition: bitvector.h:62
virtual void binBoundaries(std::vector< double > &) const
The function binBoundaries and binWeights return bin boundaries and counts of each bin respectively...
Definition: idirekte.cpp:1767
index(const ibis::column *c=0)
Default constructor.
Definition: index.h:423
virtual long append(const char *dt, const char *df, uint32_t nnew)
Append the index in df to the one in dt.
Definition: idirekte.cpp:1498
array_t< uint32_t > * keys(const ibis::bitvector &mask) const
Convert the bitvector mask into key values.
Definition: idirekte.cpp:1049
void clear()
Remove the existing content of a bitvector.
Definition: bitvector.cpp:243
A discrete range expression.
Definition: qExpr.h:337
A version of precise index that directly uses the integer values.
Definition: idirekte.h:17
ibis::direkte, hash value to bitmaps.
Definition: index.h:136
virtual double getMin() const
The minimum value recorded in the index.
Definition: idirekte.h:82
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.
Definition: idirekte.h:30