1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
static bool _comp_greater_equal(T t1, T t2) {return t1 >= t2;}
static bool _comp_greater(T t1, T t2) {return t1 > t2;}
static bool _comp_equal(T t1, T t2) {return t1 == t2;}
static bool _comp_lower(T t1, T t2) {return t1 < t2;}
static bool _comp_lower_equal(T t1, T t2) {return t1 <= t2;}
static bool _comp_not_equal(T t1, T t2) {return t1 != t2;}
inline bool operator >= (const mVector<T> &v) const
{
return (this->size() > v.size() || this->size() == v.size() && std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_greater_equal));
}
inline bool operator > (const mVector<T> &v) const
{
return (this->size() > v.size() || std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_greater));
}
inline bool operator == (const mVector<T> &v) const
{
return (this->size() == v.size() && std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_equal));
}
inline bool operator < (const mVector<T> &v) const
{
return (this->size() < v.size() || std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_lower));
}
inline bool operator <= (const mVector<T> &v) const
{
return (this->size() < v.size() || this->size() == v.size() && std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_lower_equal));
}
inline bool operator != (const mVector<T> &v) const
{
return (this->size() != v.size() || std::lexicographical_compare(this->begin().t, this->end().t, v.begin().t, v.end().t, _comp_not_equal));
}
|