]> www.ginac.de Git - ginac.git/blobdiff - ginac/relational.cpp
- added find() (like has(), but returns list of all occurrences)
[ginac.git] / ginac / relational.cpp
index 88f2ad643b36659c03cdae2299533a150b971257..74ce1acbb1cf716947981c0d11a45abdd1e11886 100644 (file)
@@ -205,6 +205,14 @@ int relational::compare_same_type(const basic & other) const
        return (o < oth.o) ? -1 : 1;
 }
 
+bool relational::match_same_type(const basic & other) const
+{
+       GINAC_ASSERT(is_exactly_of_type(other, relational));
+       const relational &oth = static_cast<const relational &>(other);
+
+       return o == oth.o;
+}
+
 unsigned relational::return_type(void) const
 {
        GINAC_ASSERT(lh.return_type()==rh.return_type());