test {gcolor}R Documentation

Generates n x n test matrix

Description

Generates an n x n matrix of optimal solution cardinality k to test the Inequation Algorithm

Usage

test(n,k)

Arguments

n The size of the matrix.
k The optimal solution cardinality of the coloring of the graph represented by the matrix.

Details

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.

Value

A matrix of size n x n and optimal coloring solution cardinality = k

Author(s)

Jeffrey Duffany, Ph.D.

See Also

importDIMACSBin, importDIMACSAscii, ineq

Examples


## Creates an n x n matrix of optimal solution cardinality 3
a<-test(10,3)

[Package gcolor version 1.0 Index]