View source: R/binaryBenchmarkFunctions.R
benchmarkGeneratorMaxCut | R Documentation |
Generates MaxCut problems, with binary decision variables. The MaxCut Problems are transformed to minimization problems by negation.
benchmarkGeneratorMaxCut(N, A)
N |
length of the bit strings |
A |
The adjacency matrix of the graph. Will be created at random if not provided. |
the function of type cost=f(bitstring). Returned fitness values will be negative, for purpose of minimization.
fun <- benchmarkGeneratorMaxCut(N=6)
fun(c(1,0,1,1,0,0))
fun(c(1,0,1,1,0,1))
fun(c(0,1,0,0,1,1))
fun <- benchmarkGeneratorMaxCut(A=matrix(c(0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0),4,4))
fun(c(1,0,1,0))
fun(c(1,0,1,1))
fun(c(0,1,0,1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.