From: Christian Bauer Date: Tue, 5 Nov 2002 17:50:20 +0000 (+0000) Subject: synced to 1.0 X-Git-Tag: release_1-1-0~57 X-Git-Url: https://www.ginac.de/ginac.git/static/gitweb.css/ginac.git?a=commitdiff_plain;h=f9611d2a00d20aaa89f23bbe32d24dccb4de2e4f;p=ginac.git synced to 1.0 --- diff --git a/ginac/tensor.cpp b/ginac/tensor.cpp index 4d514d14..49be6a30 100644 --- a/ginac/tensor.cpp +++ b/ginac/tensor.cpp @@ -493,13 +493,16 @@ bool tensepsilon::contract_with(exvector::iterator self, exvector::iterator othe if (is_exactly_a(other->op(0)) && num+1 == other->nops()) { // Contraction of two epsilon tensors is a determinant + bool variance = is_a(self->op(1)); matrix M(num, num); for (int i=0; iop(i+1), other->op(j+1), pos_sig); - else + else if (variance) M(i, j) = metric_tensor(self->op(i+1), other->op(j+1)); + else + M(i, j) = delta_tensor(self->op(i+1), other->op(j+1)); } } int sign = minkowski ? -1 : 1;