GraphTheory[Arrivals]
GraphTheory[Departures]
GraphTheory[Neighbors]
|
Calling Sequence
|
|
Arrivals(G, v)
Departures(G,v)
Neighbors(G, v)
|
|
Parameters
|
|
G
|
-
|
graph
|
v
|
-
|
vertex of the graph (optional)
|
|
|
|
|
Description
|
|
•
|
Neighbors returns a list of lists if the input is just a graph. The ith list is the list of neighbors of the ith vertex of the graph. Neighbors(G, v) returns the list of neighbors of vertex v in the graph G.
|
•
|
Arrivals returns a list of the lists of vertices which are at the tail of arcs directed into vertex i. Undirected edges are treated as if they were bidirectional. If a vertex v is specified, the output is only the list of vertices which are at the tail of arcs directed into vertex v.
|
•
|
Departures is similar to Arrivals, but returns a list of the lists of vertices which are at the head of edges directed out of vertex i. If a vertex v is specified, the output is only the list of vertices which are at the head of edge directed out of vertex v.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
|
|
Download Help Document
Was this information helpful?