X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fclifford.cpp;h=80d7d3426a58d430ff8b33ccbc88527b2c69b5da;hp=a6a1333e4c10bd54a2ed6a4e5b0a9cc6dcdf5d1c;hb=708e9e647029af699333fceffc0a76bef70a4709;hpb=e6b8c3caae6f9877f27b67522390290ae936a112 diff --git a/ginac/clifford.cpp b/ginac/clifford.cpp index a6a1333e..80d7d342 100644 --- a/ginac/clifford.cpp +++ b/ginac/clifford.cpp @@ -128,7 +128,7 @@ DEFAULT_ARCHIVING(diracgamma5) int clifford::compare_same_type(const basic & other) const { - GINAC_ASSERT(other.tinfo() == TINFO_clifford); + GINAC_ASSERT(is_of_type(other, clifford)); const clifford &o = static_cast(other); if (representation_label != o.representation_label) { @@ -139,6 +139,14 @@ int clifford::compare_same_type(const basic & other) const return inherited::compare_same_type(other); } +bool clifford::match_same_type(const basic & other) const +{ + GINAC_ASSERT(is_of_type(other, clifford)); + const clifford &o = static_cast(other); + + return representation_label == o.representation_label; +} + DEFAULT_COMPARE(diracone) DEFAULT_COMPARE(diracgamma) DEFAULT_COMPARE(diracgamma5)