abstract class $UGRAPH{NTP} < $RO_UGRAPH{NTP} |
---|
**** | A modifiable undirected graph. It has edges of type UEDGE{NTP}, which are simply unordered pairs of nodes |
$RO_UGRAPH{_} | $GRAPH{_,_} | $STR | $ELT{_} |
$ELT |
UGRAPH{_} | UGRAPH_INCL{_} |
add_node: NTP; |
---|
**** | Add a node to the graph and return the node index, which is an internal reference to the node (used within the graph implementation) |
add_node(n: NTP): NTP; |
---|
**** | Add a node to the graph and return the new node index, which is an internal reference to the node (used within the graph implementation) The node that is returned may or may not be the same as the node "n" that is passed in as an argument. |
connect(e: UEDGE{NTP}); |
---|
**** | Connect the nodes specified by edge "e". i.e. create an edge between e.first and e.second Usage: g: DIGRAPH{INT} := #;
____n3_::=_g.add_node;_ ____n4_::=_g.add_node; ____g.connect(#DIEDGE{INT}(n3,n4)); Note that UGRAPH_INCL has wrappers to allow you to write g.connect(n3,n4); |
delete_node(n: NTP); |
---|
**** | Delete the node "n" from the graph, and any associated edges |
disconnect(e: UEDGE{NTP}); |
---|
**** | Remove the edge "e" from the graph, from between nodes e.first and e.second |