jmetal.encodings.variable
Class Real

java.lang.Object
  extended by jmetal.core.Variable
      extended by jmetal.encodings.variable.Real
All Implemented Interfaces:
java.io.Serializable

public class Real
extends Variable

This class implements a Real value decision encodings.variable

See Also:
Serialized Form

Constructor Summary
Real()
          Constructor
Real(double lowerBound, double upperBound)
          Constructor
Real(double lowerBound, double upperBound, double value)
          Constructor
Real(Variable variable)
          Copy constructor.
 
Method Summary
 Variable deepCopy()
          Returns a exact copy of the Real encodings.variable
 double getLowerBound()
          Gets the lower bound of the encodings.variable.
 double getUpperBound()
          Gets the upper bound of the encodings.variable.
 double getValue()
          Gets the value of the Real encodings.variable.
 void setLowerBound(double lowerBound)
          Sets the lower bound of the encodings.variable.
 void setUpperBound(double upperBound)
          Sets the upper bound of the encodings.variable.
 void setValue(double value)
          Sets the value of the encodings.variable.
 java.lang.String toString()
          Returns a string representing the object
 
Methods inherited from class jmetal.core.Variable
getVariableType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Real

public Real()
Constructor


Real

public Real(double lowerBound,
            double upperBound)
Constructor

Parameters:
lowerBound - Lower limit for the encodings.variable
upperBound - Upper limit for the encodings.variable

Real

public Real(double lowerBound,
            double upperBound,
            double value)
Constructor

Parameters:
lowerBound - Lower limit for the encodings.variable
upperBound - Upper limit for the encodings.variable
value - Value of the variable

Real

public Real(Variable variable)
     throws JMException
Copy constructor.

Parameters:
variable - The encodings.variable to copy.
Throws:
JMException
Method Detail

getValue

public double getValue()
Gets the value of the Real encodings.variable.

Overrides:
getValue in class Variable
Returns:
the value.

setValue

public void setValue(double value)
Sets the value of the encodings.variable.

Overrides:
setValue in class Variable
Parameters:
value - The value.

deepCopy

public Variable deepCopy()
Returns a exact copy of the Real encodings.variable

Specified by:
deepCopy in class Variable
Returns:
the copy

getLowerBound

public double getLowerBound()
Gets the lower bound of the encodings.variable.

Overrides:
getLowerBound in class Variable
Returns:
the lower bound.

getUpperBound

public double getUpperBound()
Gets the upper bound of the encodings.variable.

Overrides:
getUpperBound in class Variable
Returns:
the upper bound.

setLowerBound

public void setLowerBound(double lowerBound)
Sets the lower bound of the encodings.variable.

Overrides:
setLowerBound in class Variable
Parameters:
lowerBound - The lower bound.

setUpperBound

public void setUpperBound(double upperBound)
Sets the upper bound of the encodings.variable.

Overrides:
setUpperBound in class Variable
Parameters:
upperBound - The upper bound.

toString

public java.lang.String toString()
Returns a string representing the object

Overrides:
toString in class java.lang.Object
Returns:
the string