tables::column::lt,le
1)
template<is_primitive_type P>
inline
column<bool_t>
column<P>::lt(const column<P>& rhs) const
2)
template<is_primitive_type P>
inline
column<bool_t>
column<P>::lt(const P cte) const
3)
template<is_primitive_type P>
inline
column<bool_t>
column<P>::le(const column<P>& rhs) const
4)
template<is_primitive_type P>
inline
column<bool_t>
column<P>::le(const P cte) const
1 and 2) Returns column-of-bools containing column-wise less-than comparison between this and rhs
columns or between this and cte
value.
3 and 4) Returns column-of-bools containing column-wise less-or-equal comparison between this and rhs
columns or between this and cte
value.
Example
Code
#include <cpptables/table.hh>
using namespace tables;
using namespace std;
void column_lt_le()
{
const column<unsigned> c0({ 1, 2, 3, 4 ,5});
const column<unsigned> c1({ 1, 2, 10, 20, 30});
{
const column<bool> r0 = c0.lt(c1); // same as c0 < c1
cout << r0 << "\n";
const column<bool> r1 = c0.le(c1); // same as c0 <= c1
cout << r1 << "\n";
}
{
const column<bool> r0 = c0.lt(3); // same as c0 < 3
cout << r0 << "\n";
const column<bool> r1 = c0.le(3); // same as c0 <= 3
cout << r1 << "\n";
}
}