jmetal.problems.singleObjective
Class OneMax

java.lang.Object
  extended by jmetal.core.Problem
      extended by jmetal.problems.singleObjective.OneMax
All Implemented Interfaces:
java.io.Serializable

public class OneMax
extends Problem

Class representing problem OneMax. The problem consist of maximizing the number of '1's in a binary string.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jmetal.core.Problem
length_, lowerLimit_, numberOfConstraints_, numberOfObjectives_, numberOfVariables_, problemName_, solutionType_, upperLimit_
 
Constructor Summary
OneMax(java.lang.String solutionType)
          Creates a new OneZeroMax problem instance
OneMax(java.lang.String solutionType, java.lang.Integer numberOfBits)
          Creates a new OneMax problem instance
 
Method Summary
 void evaluate(Solution solution)
          Evaluates a solution
 
Methods inherited from class jmetal.core.Problem
evaluateConstraints, getLength, getLowerLimit, getName, getNumberOfBits, getNumberOfConstraints, getNumberOfObjectives, getNumberOfVariables, getPrecision, getPrecision, getSolutionType, getUpperLimit, setNumberOfVariables, setPrecision, setSolutionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneMax

public OneMax(java.lang.String solutionType)
       throws java.lang.ClassNotFoundException
Creates a new OneZeroMax problem instance

Parameters:
solutionType - Solution type
Throws:
java.lang.ClassNotFoundException

OneMax

public OneMax(java.lang.String solutionType,
              java.lang.Integer numberOfBits)
Creates a new OneMax problem instance

Parameters:
numberOfBits - Length of the problem
Method Detail

evaluate

public void evaluate(Solution solution)
Evaluates a solution

Specified by:
evaluate in class Problem
Parameters:
solution - The solution to evaluate