]> www.ginac.de Git - ginac.git/blobdiff - ginac/symmetry.cpp
fixed comments
[ginac.git] / ginac / symmetry.cpp
index ab31838b18668d156cc751930579463796666948..a07fbe7eb11ccce7b5c8edc8fb623884f1536757 100644 (file)
@@ -24,9 +24,6 @@
 #include <functional>
 #include <algorithm>
 
-#define DO_GINAC_ASSERT
-#include "assertion.h"
-
 #include "symmetry.h"
 #include "lst.h"
 #include "numeric.h" // for factorial()
@@ -289,12 +286,15 @@ int canonicalize(exvector::iterator v, const symmetry &symm)
        first = symm.children.begin();
        switch (symm.type) {
                case symmetry::symmetric:
+                       // Sort the children in ascending order
                        shaker_sort(first, last, sy_is_less(v), sy_swap(v, something_changed));
                        break;
                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));
                        break;
                case symmetry::cyclic:
+                       // Permute the smallest child to the front
                        cyclic_permutation(first, last, min_element(first, last, sy_is_less(v)), sy_swap(v, something_changed));
                        break;
                default: