For the two vertex case there is only a single connected graph:
A---B
(The labels A and B here simply indicate the two vertices and are not a true labelling.)
If we add a third vertex, there are two connected graphs:
A---B
\ /
C
And:
A---B---C
This function permutes all such connected graphs for a given vertex count.
Note that the output is in the form of a matrix of edges. For the three vertex case above these would be:
[,1] [,2]
[1,] "A" "B"
[2,] "A" "C"
[3,] "B" "C"
And:
[,1] [,2]
[1,] "A" "B"
[2,] "B" "C"
Again, it is important to note that the labels A, B, and C here are purely "dummy" labels and should not be considered a graph labelling. To use the second graph as an example there are multiple labellings of this graph:
A---B---C
And:
B---A---C
And:
A---C---B
However, these are all isomorphisms of the same unlabelled graph. Only the unique graphs themselves are returned here.