circuitree.viz.complexity_layout
- circuitree.viz.complexity_layout(tree: CircuiTree, dy: float = 0.5, aspect: float = 2.0) tuple[dict[str, int], dict[str, tuple[float, float]]]
Returns the depth and xy coordinates of each node in the search graph when visualized based on complexity.
In a complexity layout, a search graph is represented by a series of layers, where each layer contains nodes that have the same complexity, which is measured as the depth, or distance from the root node. Layers are separated in the y direction, and in the x direction, nodes in the same layer are sorted by the number of visits they have received. Terminal nodes are subsumed into their parent nonterminals.