public void addInsertionRule(SimpleTensor tensor, IndexType omittedIndexType) {
addInsertionRule(CC.getNameDescriptor(tensor.getName()), omittedIndexType);
}
public void addInsertionRule(NameDescriptor nd, IndexType omittedIndexType) {
NameAndStructureOfIndices originalStructureAndName = NameDescriptor.extractKey(nd);
StructureOfIndices structure = nd.getStructureOfIndices();
if (structure.getTypeData(omittedIndexType.getType()).length == 0)
throw new IllegalArgumentException("No indices of specified type in tensor.");