class FILTERGRAPH_DIGRAPH_VIEW{NTP,GTP<$RO_DIGRAPH{NTP}} < $RO_DIGRAPH{NTP} |
---|
**** | View a graph through a node/edge filter predicate Only the nodes and edges that satisfy the predicates are visible as nodes and edges in this view. If the node predicate is "np" and the edge predicate is "ep", Nodes which satisfy "np" are in the graph Edges which satisfy "ep" and whose nodes are both satisfied by "np" are in the graph. |
$RO_DIGRAPH{_} | $GRAPH{_,_} | $STR | $ELT{_} |
$ELT | RO_DIGRAPH_INCL{_} |
FILTERGRAPH_DIGRAPH_VIEW{_} |
create(m:GTP,np:ROUT{NTP}:BOOL): SAME |
---|
**** | Create a subgraph of "m", which includes all nodes that pass the node filter "np" |
create(m:GTP,np:ROUT{NTP}:BOOL,ep:ROUT{DIEDGE{NTP}}:BOOL): SAME |
---|
**** | Create a subgraph of "m". It consists of nodes that pass the node filter "np" and edges that pass the edge filter, whose ends pass the node filter. Nodes n that belong to "m" and np.call(n) = true Edges e (1) m.has_edge(e)
_________(2)_np.call(e.first)_and_np.call(e.second) _________(3)_ep.call(e) |
has_edge(e: DIEDGE{NTP}): BOOL |
---|
**** | An edge exists here if and only if it exists in the source, both its end points pass the node filter and the edge itself passes the edge filter |
has_node(n: NTP): BOOL |
---|
n_edges: INT |
---|
n_incoming(n: NTP): INT |
---|
**** | Compute the number of edges by actually iterating over the edges and returning the resulting number found |
n_nodes: INT |
---|
n_outgoing(n: NTP): INT |
---|
**** | Compute the number of outgoing edges by actually iterating over them |
edge!: DIEDGE{NTP} |
---|
incoming!(once n: NTP): NTP |
---|
node!: NTP |
---|
**** | Yield all the nodes in the source that pass the filter node predicate |
outgoing!(once n: NTP): NTP |
---|
**** | Yield all the outgoing nodes from node "n". Yield only nodes which pass the filter and are connected by an edge that passes the filter |
attr ep: ROUT{DIEDGE{NTP}}: BOOL; |
---|
attr ep: ROUT{DIEDGE{NTP}}: BOOL; |
---|
attr np: ROUT{NTP}: BOOL; |
---|
attr np: ROUT{NTP}: BOOL; |
---|
attr source:GTP; |
---|
attr source:GTP; |
---|