energia.represent.ations.graph

Contents

energia.represent.ations.graph#

Graph

Functions

dataclass([cls, init, repr, eq, order, ...])

Add dunder methods based on the fields defined in the class.

Classes

Edge([label])

Edge of a Graph

Graph(model)

Graph representation

Node([label])

Node of a Graph

class Graph(model: Model)[source]#

Bases: _Hash

Graph representation

Parameters:

model (Model) – Model to which the graph belongs.

Variables:
  • name (str) – Name of the graph. Defaults to None.

  • nodes (list[Node]) – List of nodes in the graph.

  • edges (list[Edge]) – List of edges in the graph.

Note

  • name is generated based on Model name

  • nodes and edges are populated as model is defined

model: Model#