/** * first for kronecker, second for metric * * @return */ @Override NameAndStructureOfIndices[] getKeys() { return new NameAndStructureOfIndices[]{new NameAndStructureOfIndices(names[0], structuresOfIndices), new NameAndStructureOfIndices(names[1], structuresOfIndices)}; }
NameDescriptorForSimpleTensor(String name, StructureOfIndices[] indexTypeStructures, int id) { super(indexTypeStructures, id); this.name = name; this.key = new NameAndStructureOfIndices[]{new NameAndStructureOfIndices(name, indexTypeStructures)}; }
public NameDescriptorForTensorFieldImpl(String name, StructureOfIndices[] indexTypeStructures, int id, boolean isDiracDelta) { super(indexTypeStructures, id, new int[indexTypeStructures.length - 1], name, isDiracDelta); this.keys = new NameAndStructureOfIndices[]{new NameAndStructureOfIndices(name, indexTypeStructures)}; }
/** * @return {@link NameAndStructureOfIndices} */ public NameAndStructureOfIndices getIndicesTypeStructureAndName() { return new NameAndStructureOfIndices(name, new StructureOfIndices[]{StructureOfIndices.create(indices)}); }
NameAndStructureOfIndices key = new NameAndStructureOfIndices(sname, structureOfIndices); boolean rLocked = true; readLock.lock();
@Override public NameAndStructureOfIndices getIndicesTypeStructureAndName() { StructureOfIndices[] typeStructures = new StructureOfIndices[1 + argumentsIndices.length]; typeStructures[0] = StructureOfIndices.create(indices); for (int i = 0; i < argumentsIndices.length; ++i) { if (argumentsIndices[i] == null) argumentsIndices[i] = IndicesFactory.createSimple(null, content[i].getIndices().getFree()); typeStructures[i + 1] = StructureOfIndices.create(argumentsIndices[i]); } return new NameAndStructureOfIndices(name, typeStructures); }
public NameAndStructureOfIndices[] getKeys() { IndexType[] toOmit = indicesAllowedToOmit.toArray(new IndexType[indicesAllowedToOmit.size()]); int omitted, i; NameAndStructureOfIndices[] keys = new NameAndStructureOfIndices[(1 << toOmit.length) - 1]; int[] allCounts; BitArray[] states; for (omitted = 1; omitted <= keys.length; ++omitted) { allCounts = originalStructureAndName.getStructure()[0].getTypesCounts(); states = originalStructureAndName.getStructure()[0].getStates(); for (i = 0; i < toOmit.length; ++i) if ((omitted & (1 << i)) != 0) { allCounts[toOmit[i].getType()] = 0; states[toOmit[i].getType()] = states[toOmit[i].getType()] == null ? null : BitArray.EMPTY; } StructureOfIndices[] structures = originalStructureAndName.getStructure().clone(); structures[0] = StructureOfIndices.create(allCounts, states); keys[omitted - 1] = new NameAndStructureOfIndices(originalStructureAndName.getName(), structures); } return keys; } }