extending the type of clifford_max_label to include all 257 possible
return values. Thanks to Martin Guy for the bug report and patch.
{
std::auto_ptr<epvector> coeffseq(new epvector);
std::auto_ptr<epvector> coeffseq_cliff(new epvector);
- char rl = clifford_max_label(s);
+ int rl = clifford_max_label(s);
bool do_clifford = (rl != -1);
bool nonscalar = false;
return e1;
}
-char clifford_max_label(const ex & e, bool ignore_ONE)
+int clifford_max_label(const ex & e, bool ignore_ONE)
{
if (is_a<clifford>(e))
if (ignore_ONE && is_a<diracone>(e.op(0)))
else
return ex_to<clifford>(e).get_representation_label();
else {
- char rl = -1;
+ int rl = -1;
for (size_t i=0; i < e.nops(); i++)
rl = (rl > clifford_max_label(e.op(i), ignore_ONE)) ? rl : clifford_max_label(e.op(i), ignore_ONE);
return rl;
*
* @param e Expression to be processed
* @ignore_ONE defines if clifford_ONE should be ignored in the search*/
-char clifford_max_label(const ex & e, bool ignore_ONE = false);
+int clifford_max_label(const ex & e, bool ignore_ONE = false);
/** Calculation of the norm in the Clifford algebra. */
ex clifford_norm(const ex & e);