-bool relational::is_equal_same_type(const basic & other) const
-{
- GINAC_ASSERT(is_a<relational>(other));
- const relational &oth = static_cast<const relational &>(other);
- if (o==oth.o && lh.is_equal(oth.lh) && rh.is_equal(oth.rh))
- return true;
- switch (o) {
- case equal:
- case not_equal:
- if (oth.o!=o)
- return false;
- break;
- case less:
- if (oth.o!=greater)
- return false;
- break;
- case less_or_equal:
- if (oth.o!=greater_or_equal)
- return false;
- break;
- case greater:
- if (oth.o!=less)
- return false;
- break;
- case greater_or_equal:
- if (oth.o!=less_or_equal)
- return false;
- break;
- }
- return lh.is_equal(oth.rh) && rh.is_equal(oth.lh);
-}
-
-