}
return tensor;
}
public void transform(Tensor tensor1, Tensor tensor2) {
Indices indices = new IndicesBuilderSorted().append(tensor1.getIndices()).append(tensor2.getIndices()).getIndices();
checked.ensureCapacity(indices.size());
int index;
IndexMappingDirectAllowingUnmapped im = new IndexMappingDirectAllowingUnmapped();
//TODO discover case to put allIndices in ig
IndexGenerator ig = new IndexGenerator(new IndicesBuilderSorted().append(indices).append(usedNames).asArray());
for (int i = 0; i < indices.size(); i++) {
index = indices.get(i);
if (checked.contains(getNameWithType(index))) {
if (Arrays.binarySearch(usedNames, getNameWithType(index)) >= 0) {
int newIndex = getRawStateInt(index) | ig.generate(getType(index));