getConfs: Generate Configurations of a Graph

Description Usage Arguments Details Value Examples

Description

Using recursive method to generate all possible configurations of a graph.

Usage

1
   getConfs(nvertex, ncolor)

Arguments

nvertex

number of vertices in a graph.

ncolor

number of colors each vertex can take.

Details

Suppose there are n vertices and each can take values from 1,2, …, 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).

Value

A matrix of all possible configurations. Each column corresponds to one configuration.

Examples

1
2
3
  #Example 1: There are two vertices and each is either of
  #           color 1 or 2.
  getConfs(2,2)

PottsUtils documentation built on May 2, 2019, 6:45 a.m.