GraphTheory[IsDirected]
GraphTheory[IsWeighted]
|
Calling Sequence
|
|
IsDirected(G)
IsWeighted(G)
|
|
Description
|
|
•
|
The IsDirected(G) function returns true or false depending on whether the input graph is a directed or undirected graph.
|
•
|
The IsWeighted(G) function returns true if G is a weighted graph, and false otherwise.
|
•
|
To remove directions and weights from a graph, use the UnderlyingGraph command.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
|
|
Download Help Document
Was this information helpful?