]> www.ginac.de Git - ginac.git/commitdiff
synced to 1.0
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 22 Jul 2002 20:33:13 +0000 (20:33 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 22 Jul 2002 20:33:13 +0000 (20:33 +0000)
ginac/symmetry.cpp

index 78dd75cf81c4f727ecf5fc389609187e57d8a735..d48ed3f166aed0830c01a030f2be900131d8c94c 100644 (file)
@@ -305,7 +305,7 @@ public:
 
 int canonicalize(exvector::iterator v, const symmetry &symm)
 {
-       // Less than two indices? Then do nothing
+       // Less than two elements? Then do nothing
        if (symm.indices.size() < 2)
                return INT_MAX;
 
@@ -335,6 +335,8 @@ int canonicalize(exvector::iterator v, const symmetry &symm)
                case symmetry::antisymmetric:
                        // Sort the children in ascending order, keeping track of the signum
                        sign *= permutation_sign(first, last, sy_is_less(v), sy_swap(v, something_changed));
+                       if (sign == 0)
+                               return 0;
                        break;
                case symmetry::cyclic:
                        // Permute the smallest child to the front