From: Christian Bauer Date: Mon, 30 Jul 2001 20:02:34 +0000 (+0000) Subject: epsilon tensor contractions evaluate to metric tensors instead of deltas, X-Git-Tag: release_0-9-2~8 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=d1a4416a1bb37290a42250d871b7b52e35f64e0a epsilon tensor contractions evaluate to metric tensors instead of deltas, which is more general --- diff --git a/ginac/tensor.cpp b/ginac/tensor.cpp index 0d93e652..7b3d1417 100644 --- a/ginac/tensor.cpp +++ b/ginac/tensor.cpp @@ -507,9 +507,14 @@ bool tensepsilon::contract_with(exvector::iterator self, exvector::iterator othe // Contraction of two epsilon tensors is a determinant ex dim = ex_to(self->op(1)).get_dim(); matrix M(num, num); - for (int i=0; iop(i+1), other->op(j+1)); + for (int i=0; iop(i+1), other->op(j+1), pos_sig); + else + M(i, j) = metric_tensor(self->op(i+1), other->op(j+1)); + } + } int sign = minkowski ? -1 : 1; *self = sign * M.determinant().simplify_indexed(); *other = _ex1();