if (points.equals(container.points)) { if (container.graphType != sg.getGraphType() || !Arrays.equals(container.partition, partition)) { fillGraphPrint(subgraphs.get(i).partition); matched.add(i); } else if (includes(partition, container.partition) && sg.getGraphType() == container.graphType) { subgraphs.add(new SubgraphContainer(sg.getGraphType(), partition, points, type)); else if (newGraph) fillGraphPrint(partition);
boolean somethingDone = false; for (PrimitiveSubgraph ps : subgraphs) { if (ps.getGraphType() == GraphType.Graph) throw new IllegalArgumentException("Not a product of matrices."); if (ps.getGraphType() != GraphType.Line) continue; int[] partition = ps.getPartition();
private Tensor expandDiracStructures(final Tensor t) { FromChildToParentIterator iterator = new FromChildToParentIterator(t); Tensor current; while ((current = iterator.next()) != null) { if (!(current instanceof Product)) continue; //early termination if (!containsGammaOr5Matrices(current)) continue; Product product = (Product) current; //positions of matrices PrimitiveSubgraph[] partition = PrimitiveSubgraphPartition.calculatePartition(product.getContent(), matrixType); //traces (expand brackets) boolean containsTraces = false; traces: for (PrimitiveSubgraph subgraph : partition) { if (subgraph.getGraphType() != GraphType.Cycle) continue traces; //expand each cycle containsTraces = true; } if (containsTraces) iterator.set(multiply(product.getIndexlessSubProduct(), expandAndEliminate.transform(product.getDataSubProduct()))); } return iterator.result(); }
if (filter.is(partition[iPartition].getGraphType())) break; if (currentSubgraph.getGraphType() == GraphType.Cycle && g5Positions.size() == 1 && gPositions.size() == currentSubgraph.size() if (currentSubgraph.getGraphType() == GraphType.Cycle && gPositions.size() == currentSubgraph.size()) graphType = GraphType.Cycle;
for (PrimitiveSubgraph subgraph : subgraphs) { if (subgraph.getGraphType() != GraphType.Cycle) continue;
for (PrimitiveSubgraph subgraph : partition) { matched.clear(); if (subgraph.getGraphType() != GraphType.Line) continue; SpinorType left = isSpinor(pc.get(subgraph.getPosition(0))),