Graph
graphorchestrator.graph.graph
Graph
Represents a directed graph composed of nodes and edges.
Attributes:
Name | Type | Description |
---|---|---|
nodes |
Dict[str, Node]
|
A dictionary mapping node IDs to Node objects. |
concrete_edges |
List[ConcreteEdge]
|
A list of concrete edges in the graph. |
conditional_edges |
List[ConditionalEdge]
|
A list of conditional edges in the graph. |
start_node |
Node
|
The starting node of the graph. |
end_node |
Node
|
The ending node of the graph. |
Source code in graphorchestrator\graph\graph.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
__init__(start_node, end_node, name='graph')
Initializes a Graph object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_node
|
Node
|
The starting node of the graph. |
required |
end_node
|
Node
|
The ending node of the graph. |
required |
name
|
Optional[str]
|
An optional name for the graph (default: "graph"). |
'graph'
|
Raises:
Type | Description |
---|---|
TypeError
|
If start_node or end_node is not of type Node. |
Returns:
Type | Description |
---|---|
None
|
None |
Source code in graphorchestrator\graph\graph.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
|