NodeData#

class hugr.hugr.base.NodeData(op: ~hugr.ops.Op, parent: ~hugr.hugr.node_port.Node | None, _num_inps: int = 0, _num_outs: int = 0, children: list[~hugr.hugr.node_port.Node] = <factory>, metadata: dict[str, ~typing.Any] = <factory>)[source]#

Bases: object

Node weights in HUGR graph. Defined by an operation and parent node.

Methods

Attributes

op

The operation of the node.

parent

The parent node, or None for the root node.

children

metadata

op: Op#

The operation of the node.

parent: Node | None#

The parent node, or None for the root node.