GraphTheory[GraphEqual]
|
Calling Sequence
|
|
GraphEqual(G, H)
|
|
Description
|
|
•
|
GraphEqual(G,H) returns true if the two input graphs are equal. Here the graphs are equal if they are (i) both directed or both undirected, (ii) both weighted or both unweighted, (iii) have the same vertex labels and in the same order, (iv) have the same edges. Further, if the graphs are both weighted graphs, their edge weights must be equal and integer edge weights are considered different from floating point edge weights.
|
•
|
Thus G = Graph([1,2,3],{{1,2},{2,3}}) is considered not equal to H = Graph([1,3,2],{{1,2},{2,3}}) even though their edge sets are the same. If you want to test if the graphs are equal up to a permutation of the vertices then you may compare if their edge sets are equal.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
>
|
|
| (7) |
>
|
|
| (8) |
>
|
|
| (9) |
>
|
|
| (10) |
>
|
|
| (11) |
>
|
|
| (12) |
>
|
|
| (13) |
|
|
Download Help Document
Was this information helpful?