getConfs | R Documentation |
Using recursive method to generate all possible configurations of a graph.
getConfs(nvertex, ncolor)
nvertex |
number of vertices in a graph. |
ncolor |
number of colors each vertex can take. |
Suppose there are n vertices and each can take values from
1,2, \ldots, ncolor
.
This function generates all possible configurations.
For example, if there are two vertices and each can be either 1 or 2,
then the possible configurations are (1,1), (1,2), (2,1) and (2,2).
A matrix of all possible configurations. Each column corresponds to one configuration.
#Example 1: There are two vertices and each is either of
# color 1 or 2.
getConfs(2,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.