benchmarkGeneratorMaxCut: MaxCut Benchmark Creation

Description Usage Arguments Value Examples

View source: R/binaryBenchmarkFunctions.R

Description

Generates MaxCut problems, with binary decision variables. The MaxCut Problems are transformed to minimization problems by negation.

Usage

1

Arguments

N

length of the bit strings

A

The adjacency matrix of the graph. Will be created at random if not provided.

Value

the function of type cost=f(bitstring). Returned fitness values will be negative, for purpose of minimization.

Examples

1
2
3
4
5
6
7
8
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))

CEGO documentation built on May 14, 2021, 1:08 a.m.