if (ps.getGraphType() != GraphType.Line)
continue;
int[] partition = ps.getPartition();
Tensor left = null, right = null;
Indices leftIndices = null, rightIndices = null;
Indices leftSubIndices = null, rightSubIndices = null;
int leftUpperCount, leftLowerCount, rightUpperCount, rightLowerCount, luCount = -1;
boolean leftSkip = false, rightSkip = false, leftMatrix = false, rightMatrix = false;
for (int leftPointer = 0, rightPointer = partition.length - 1;
leftPointer < rightPointer; ++leftPointer, --rightPointer) {
if (!leftSkip) {
left = data[partition[leftPointer]];
leftIndices = left.getIndices();
leftSubIndices = leftIndices.getOfType(type);
leftUpperCount = leftSubIndices.getUpper().size();
leftLowerCount = leftSubIndices.getLower().size();
if (leftUpperCount != leftLowerCount) {
if (leftLowerCount != 0 && leftUpperCount != 0)
throw new IllegalArgumentException("Not a product of matrices.");
leftMatrix = false;