-
Notifications
You must be signed in to change notification settings - Fork 0
Graph
mstern98 edited this page Mar 25, 2021
·
23 revisions
- Graph ::
- graph(max_state_change = 1, snapshot_timestamp = topylogic.START_STOP, max_loop = topylogic.MAX_LOOPS, lvl_verbose = topylogic.VERTICES + topylogic.EDGES + topylogic.FUNCTIONS + topylogic.GLOBALS, context = topylogic.SINGLE, mem_option = topylogic.CONTINUE request_flag = topylogic.IGNORE_FAIL_REQUEST);
Create a graph
>>> g = graph()Set the starting state set using the id's of the vertices
>>> v1 = vertex(g, vertex_function, id1, vertex1_variables)
v2 = vertex(g, another_vertex_function, id2, vertex2_variables)
e = edge(v1, v2, edge_function, edge_variables)
g.set_starting_ids([id1])Run the graph
>>> vr = vertex_result(var1, var2)
g.run([vr])Destroy a graph
>>> g.destroy()