This query expression has similar meaning as ibis::qDiscreteRange, however, it stores the values as signed 64-bit integers. More...
#include <qExpr.h>
Public Member Functions | |
const char * | colName () const |
Name of the column involved. | |
virtual qIntHod * | dup () const |
Duplicate thy self. | |
virtual bool | empty () const |
Is the current range empty? | |
const ibis::array_t< int64_t > & | getValues () const |
Reference to the values. | |
ibis::array_t< int64_t > & | getValues () |
Reference to the values. | |
virtual bool | inRange (double val) const |
Is the argument val one of the values stored ? Return true or false. | |
virtual bool | inRange (int64_t val) const |
Is the argument val one of the values stored ? Return true or false. | |
virtual double | leftBound () const |
The lower bound of the range. | |
virtual uint32_t | nItems () const |
Count the number of items in the query expression. | |
virtual void | print (std::ostream &) const |
Print a short version of the query expression. | |
virtual void | printFull (std::ostream &) const |
Print the full list of values. | |
qIntHod () | |
Default constructor. | |
qIntHod (const char *col, int64_t v1) | |
Constructor. Take a single number. | |
qIntHod (const char *col, const char *nums) | |
Constructor. | |
template<typename T > | |
qIntHod (const char *col, const std::vector< T > &nums) | |
Constructor. | |
qIntHod (const qIntHod &ih) | |
Copy constructor. | |
qIntHod (const char *col, int64_t v1, int64_t v2) | |
Constructor. Take two numbers. | |
template<typename T > | |
qIntHod (const char *col, const ibis::array_t< T > &nums) | |
Constructor. | |
virtual void | restrictRange (double, double) |
Reduce the range to be no more than [left, right]. | |
virtual double | rightBound () const |
The upper bound of the range. | |
virtual | ~qIntHod () |
Destructor. |
This query expression has similar meaning as ibis::qDiscreteRange, however, it stores the values as signed 64-bit integers.
This is primarily useful for matching 64-bit integers.
ibis::qIntHod::qIntHod | ( | const char * | col, |
const char * | nums | ||
) |
Constructor.
This Constructor takes a list of values in a string. The values are extracted using the function ibis::util::readInt.
References ibis::array_t< T >::deduplicate(), ibis::util::delimiters, ibis::gVerbose, ibis::array_t< T >::push_back(), and ibis::util::readInt().
ibis::qIntHod::qIntHod | ( | const char * | col, |
const std::vector< T > & | nums | ||
) |
Constructor.
It converts all incoming values into 64-bit signed integers, which may fail for certain data types.
References ibis::util::copy(), and ibis::array_t< T >::deduplicate().
ibis::qIntHod::qIntHod | ( | const char * | col, |
const ibis::array_t< T > & | nums | ||
) |
Constructor.
It converts all incoming values into 64-bit signed integers, which may fail for certain data types.
References ibis::util::copy(), and ibis::array_t< T >::deduplicate().
bool ibis::qIntHod::inRange | ( | double | val | ) | const [inline, virtual] |
Is the argument val one of the values stored ? Return true or false.
It uses a binary search if there are more than 32 elements and uses linear search otherwise.
Implements ibis::qRange.
Referenced by ibis::part::doCompare(), ibis::part::doCount(), and ibis::part::negativeCompare().
bool ibis::qIntHod::inRange | ( | int64_t | val | ) | const [inline, virtual] |
Is the argument val one of the values stored ? Return true or false.
It uses a binary search if there are more than 32 elements and uses linear search otherwise.
void ibis::qIntHod::printFull | ( | std::ostream & | out | ) | const [virtual] |
Print the full list of values.
The number are follwed by suffix 'LL' to ensure the resulting string can be parsed back as the same expression.
Reimplemented from ibis::qExpr.
![]() |