vertexcover
Class RandomVCCalculator

java.lang.Object
  extended by vertexcover.AbstractVCover
      extended by vertexcover.RandomVCCalculator

public class RandomVCCalculator
extends AbstractVCover


Constructor Summary
RandomVCCalculator(double pMut, int maxIterations)
          Creates the object
 
Method Summary
 int[] getMinimalVertexCover(JPFMap map)
          Searches minimal number of cities necessary to cover the road graph by means of random mutations
static void main(java.lang.String[] args)
           
 
Methods inherited from class vertexcover.AbstractVCover
booleans2ints, getNumberOfCitiesUsed, getNumberOfRoadsCovered, getNumberOfRoadsCovered
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomVCCalculator

public RandomVCCalculator(double pMut,
                          int maxIterations)
Creates the object

Parameters:
pMut - probablity of mutation of each array element
maxIterations - number of iterations
Method Detail

getMinimalVertexCover

public int[] getMinimalVertexCover(JPFMap map)
Searches minimal number of cities necessary to cover the road graph by means of random mutations

Specified by:
getMinimalVertexCover in class AbstractVCover
Parameters:
map - the map for the calculations
Returns:
IDs of cities selected

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments