|| descriptor.getIndexTypeStructure().size() != 2)
return;
if (descriptor.getIndexTypeStructure().get(0) != descriptor.getIndexTypeStructure().get(1))
throw new IllegalArgumentException("Wrong metric.");
descriptor.addSymmetry(
type, new Symmetry(new int[]{1, 0}, false));
if (metricNames == null)
metricNames = new int[]{descriptor.getId()};
else {
metricNames = Arrays.copyOf(metricNames, metricNames.length + 1);
metricNames[metricNames.length - 1] = descriptor.getId();
Arrays.sort(metricNames);
}
} else if (descriptor.getName().equals(kroneckerName)) {
if (descriptor.getIndexTypeStructure().size() != 2
|| (type = descriptor.getIndexTypeStructure().get(0)) != descriptor.getIndexTypeStructure().get(1))
return;
if (descriptor.getIndexTypeStructure().get(0) != descriptor.getIndexTypeStructure().get(1))
throw new IllegalArgumentException("Wrong kronecker.");
descriptor.addSymmetry(type, new Symmetry(new int[]{1, 0}, false));
if (kroneckerNames == null)
kroneckerNames = new int[]{descriptor.getId()};
else {
kroneckerNames = Arrays.copyOf(kroneckerNames, kroneckerNames.length + 1);
kroneckerNames[kroneckerNames.length - 1] = descriptor.getId();