| partial class LBLD_DIGRAPH_INCL{NTP,NLB,ELB} |
|---|
| **** | A mixin that associates labels with the nodes/edges of a graph |
| LBLD_DIGRAPH{_,_,_} | WTD_DIGRAPH{_,_} |
| stub add_node(n: NTP); |
|---|
| add_node(n: NTP,w: NLB) |
|---|
| **** | Add the node "n" to the graph with the node label "w" |
| add_node(n: NTP,l: NLB): SAME |
|---|
| **** | Version of "add_node" that returns self for convenience in chaining operations |
| stub add_node: NTP; |
|---|
| add_node_labelled(w: NLB): NTP |
|---|
| **** | Add the node "n" to the graph with the node label "w" |
| are_all_edges_labelled: BOOL |
|---|
| **** | Return true if all the edges in self are labelled |
| are_all_nodes_labelled: BOOL |
|---|
| **** | Return true if all the nodes in self have a label |
| stub connect(n1,n2: NTP); |
|---|
| connect(n1,n2: NTP,w: ELB) |
|---|
| **** | Add an edge from "n1" to "n2" with the edge label "w" |
| connect(s,d: NTP,l:ELB): SAME |
|---|
| **** | Version of "connect" that returns self for convenience in chaining connections |
| edge_label(e:DIEDGE{NTP}): ELB |
|---|
| **** | Return the edge label if it exists, void otherwise |
| has_edge_label(e:DIEDGE{NTP}): BOOL |
|---|
| has_node_label(n:NTP): BOOL |
|---|
| node_label(n:NTP): NLB |
|---|
| **** | Return void if the node is not labelled |
| set_edge_label(e: DIEDGE{NTP},w: ELB) |
|---|
| **** | Set the label of edge "e" to "w" |
| set_node_label(n: NTP,w: NLB) |
|---|
| **** | Set the label of node "n" to "w" |
| str: STR |
|---|
| **** | Print out the graph using the bound routine "f" for the nodes |
| edge!(out label: ELB): DIEDGE{NTP} |
|---|
| **** | Yield successive edges and set the corresponding value of "label" to be the edge's label, or void otherwise |
| stub edge!: DIEDGE{NTP}; |
|---|
| stub incoming!(n: NTP): NTP; |
|---|
| incoming!(once n: NTP, out a_node_label: NLB, out a_edge_label: ELB): NTP |
|---|
| **** | Yield successive incoming nodes to node "n". Set the out parameter "a_node_label" to be the corresponding label of the incoming node and "a_edge_label" to be the label of the corresponding edge from the incoming node to "n" |
| node!(out label: NLB): NTP |
|---|
| **** | Yield successive nodes and set the corresponding value of "label" to the node's label (or void, if it is not labelled) |
| stub node!: NTP; |
|---|
| stub outgoing!(n: NTP): NTP; |
|---|
| outgoing!(once n: NTP, out a_node_label: NLB, out a_edge_label: ELB): NTP |
|---|
| **** | See incoming! |
| attr edge_labels: MAP{DIEDGE{NTP},ELB}; |
|---|
| attr edge_labels: MAP{DIEDGE{NTP},ELB}; |
|---|
| init_labels |
|---|
| **** | This routine initializes the label datastructures. Since this class is meant to be used by inclusion, this routine should be called after the class has been created |
| attr node_labels: MAP{NTP,NLB}; |
|---|
| attr node_labels: MAP{NTP,NLB}; |
|---|
| ob_str(n: $OB): STR |
|---|