]> www.ginac.de Git - ginac.git/commitdiff
*** empty log message ***
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 4 Mar 2003 22:08:26 +0000 (22:08 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Tue, 4 Mar 2003 22:08:26 +0000 (22:08 +0000)
ginac/indexed.cpp
ginac/normal.cpp
ginac/tensor.cpp

index d63711044b03fbff787a47aeba51a14908c79d72..81230c4d7ff1365822d9831ac6a6c562bc8ecc01 100644 (file)
@@ -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
index 6e18f512d5e50b90b44539f5b0c4462f7bcd7c6f..db35bb8ab805cddf6161dd0a72c89f669cdbb75f 100644 (file)
@@ -2222,13 +2222,11 @@ ex power::normal(lst &sym_lst, lst &repl_lst, int level) const
                                // (a/b)^-x -> {sym((b/a)^x), 1}
                                return (new lst(replace_with_symbol(power(n_basis.op(1) / n_basis.op(0), -n_exponent), sym_lst, repl_lst), _ex1))->setflag(status_flags::dynallocated);
                        }
-
-               } else {        // n_exponent not numeric
-
-                       // (a/b)^x -> {sym((a/b)^x, 1}
-                       return (new lst(replace_with_symbol(power(n_basis.op(0) / n_basis.op(1), n_exponent), sym_lst, repl_lst), _ex1))->setflag(status_flags::dynallocated);
                }
        }
+
+       // (a/b)^x -> {sym((a/b)^x, 1}
+       return (new lst(replace_with_symbol(power(n_basis.op(0) / n_basis.op(1), n_exponent), sym_lst, repl_lst), _ex1))->setflag(status_flags::dynallocated);
 }
 
 
index f786c4a193963524ca84483880fe42670b1a515e..48393665ad5fc0555add8a19bba463af14abf288 100644 (file)
@@ -501,8 +501,8 @@ bool tensepsilon::contract_with(exvector::iterator self, exvector::iterator othe
                // Contraction of two epsilon tensors is a determinant
                bool variance = is_a<varidx>(self->op(1));
                matrix M(num, num);
-               for (int i=0; i<num; i++) {
-                       for (int j=0; j<num; j++) {
+               for (unsigned i=0; i<num; i++) {
+                       for (unsigned j=0; j<num; j++) {
                                if (minkowski)
                                        M(i, j) = lorentz_g(self->op(i+1), other->op(j+1), pos_sig);
                                else if (variance)