finesse.graph.operator_graph.OperatorGraph.fan_rule

OperatorGraph.fan_rule(self, node)

Apply the fan reduction rule to a node in the graph.

Parameters
nodeint

The index of the node.

Returns
Tuple[Tuple[int, int, int]]

A tuple of tuples representing the edges that have been reduced. Each tuple contains the indices of the start, mid, and end nodes.

Raises
Exception

If the graph is null or if an error occurs while applying the rule.