int color::compare_same_type(const basic & other) const
{
- GINAC_ASSERT(other.tinfo() == TINFO_color);
+ GINAC_ASSERT(is_of_type(other, color));
const color &o = static_cast<const color &>(other);
if (representation_label != o.representation_label) {
return inherited::compare_same_type(other);
}
+bool color::match_same_type(const basic & other) const
+{
+ GINAC_ASSERT(is_of_type(other, color));
+ const color &o = static_cast<const color &>(other);
+
+ return representation_label == o.representation_label;
+}
+
DEFAULT_COMPARE(su3one)
DEFAULT_COMPARE(su3t)
DEFAULT_COMPARE(su3f)
exvector v1;
v1.reserve(num - 2);
- for (int i=0; i<num-2; i++)
+ for (unsigned i=0; i<num-2; i++)
v1.push_back(e.op(i));
exvector v2 = v1;