// Contraction of two epsilon tensors is a determinant
ex dim = ex_to<idx>(self->op(1)).get_dim();
matrix M(num, num);
- for (int i=0; i<num; i++)
- for (int j=0; j<num; j++)
- M(i, j) = delta_tensor(self->op(i+1), other->op(j+1));
+ for (int i=0; i<num; i++) {
+ for (int j=0; j<num; j++) {
+ if (minkowski)
+ M(i, j) = lorentz_g(self->op(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();