jmetal.util.wrapper
Class XReal

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

public class XReal
extends java.lang.Object

Wrapper for accessing real-coded solutions


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

Constructor Detail

XReal

public XReal()
Constructor


XReal

public XReal(Solution solution)
Constructor

Parameters:
solution -
Method Detail

getValue

public double 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,
                     double 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 double 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 double 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:

size

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

Returns: