]> www.ginac.de Git - ginac.git/blobdiff - ginac/indexed.cpp
*** empty log message ***
[ginac.git] / ginac / indexed.cpp
index 5efd3083adc7d020162b265c2dad8130713d49b2..81230c4d7ff1365822d9831ac6a6c562bc8ecc01 100644 (file)
@@ -550,7 +550,7 @@ static ex rename_dummy_indices(const ex & e, exvector & global_dummy_indices, ex
        for (unsigned i=0; i<local_size; i++)
                local_syms.push_back(local_dummy_indices[i].op(0));
        shaker_sort(local_syms.begin(), local_syms.end(), ex_is_less(), ex_swap());
-       for (unsigned i=0; i<global_size; i++)
+       for (unsigned i=0; i<local_size; i++) // don't use more global symbols than necessary
                global_syms.push_back(global_dummy_indices[i].op(0));
        shaker_sort(global_syms.begin(), global_syms.end(), ex_is_less(), ex_swap());
 
@@ -809,7 +809,7 @@ contraction_done:
        // zero. This detects things like eps.i.j.k * p.j * p.k = 0.
        if (local_dummy_indices.size() >= 2) {
                lst dummy_syms;
-               for (int i=0; i<local_dummy_indices.size(); i++)
+               for (exvector::size_type i=0; i<local_dummy_indices.size(); i++)
                        dummy_syms.append(local_dummy_indices[i].op(0));
                if (r.symmetrize(dummy_syms).is_zero()) {
                        free_indices.clear();
@@ -959,7 +959,7 @@ ex simplify_indexed(const ex & e, exvector & free_indices, exvector & dummy_indi
 
                // Yes, construct list of all dummy index symbols
                lst dummy_syms;
-               for (int i=0; i<dummy_indices.size(); i++)
+               for (exvector::size_type i=0; i<dummy_indices.size(); i++)
                        dummy_syms.append(dummy_indices[i].op(0));
 
                // Chop the sum into terms and symmetrize each one over the dummy