i = -1;
for (Map.Entry<Tensor, Tensor> entry : tensorSubstitutions.entrySet())
scalarSubs[++i] = Tensors.expression(entry.getKey(), entry.getValue());
SubstitutionTransformation fullSub = new SubstitutionTransformation(scalarSubs, true);
for (i = 0; i < equations.length; ++i)
equations[i] = (Expression) fullSub.transform(equations[i]);
/*if (scalarSubs.length != 0) {
StringBuilder scalarsString = new StringBuilder().append('[');
for (Expression sub : scalarSubs)