test {gcolor} | R Documentation |
Generates an n x n matrix of optimal solution cardinality k to test the Inequation Algorithm
test(n,k)
n |
The size of the matrix. |
k |
The optimal solution cardinality of the coloring of the graph represented by the matrix. |
The test program first picks a random ones density for the A matrix where the ones density is the number of 1 elements in the A matrix divided by the maximum number of ones (n^2 - n). Then it generates a graph with optimal coloring solution cardinaility = k.
A matrix of size n x n and optimal coloring solution cardinality = k
Jeffrey Duffany, Ph.D.
importDIMACSBin
, importDIMACSAscii
, ineq
## Creates an n x n matrix of optimal solution cardinality 3 a<-test(10,3)