jmetal.util.wrapper
Class XInt

java.lang.Object
  extended by jmetal.util.wrapper.XInt

public class XInt
extends java.lang.Object

Wrapper class for accessing integer-coded solutions


Constructor Summary
XInt(Solution solution)
          Constructor
 
Method Summary
 int getLowerBound(int index)
          Gets the lower bound of a encodings.variable
 int getNumberOfDecisionVariables()
          Returns the number of variables of the solution
 int getUpperBound(int index)
          Gets the upper bound of a encodings.variable
 int getValue(int index)
          Gets value of a encodings.variable
 void setValue(int index, int value)
          Sets the value of a encodings.variable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XInt

public XInt(Solution solution)
Constructor

Parameters:
solution -
Method Detail

getValue

public int getValue(int index)
             throws JMException
Gets value of a encodings.variable

Parameters:
index - Index of the encodings.variable
Returns:
The value of the encodings.variable
Throws:
JMException

setValue

public void setValue(int index,
                     int value)
              throws JMException
Sets the value of a encodings.variable

Parameters:
index - Index of the encodings.variable
value - Value to be assigned
Throws:
JMException

getLowerBound

public int getLowerBound(int index)
                  throws JMException
Gets the lower bound of a encodings.variable

Parameters:
index - Index of the encodings.variable
Returns:
The lower bound of the encodings.variable
Throws:
JMException

getUpperBound

public int getUpperBound(int index)
                  throws JMException
Gets the upper bound of a encodings.variable

Parameters:
index - Index of the encodings.variable
Returns:
The upper bound of the encodings.variable
Throws:
JMException

getNumberOfDecisionVariables

public int getNumberOfDecisionVariables()
Returns the number of variables of the solution

Returns: