jmetal.encodings.variable
Class Int

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

public class Int
extends Variable

This class implements an integer decision encodings.variable

See Also:
Serialized Form

Constructor Summary
Int()
          Constructor
Int(int lowerBound, int upperBound)
          Constructor
Int(int value, int lowerBound, int upperBound)
          Constructor
Int(Variable variable)
          Copy constructor.
 
Method Summary
 Variable deepCopy()
          Creates an exact copy of the Int object.
 double getLowerBound()
          Returns the lower bound of the encodings.variable.
 double getUpperBound()
          Returns the upper bound of the encodings.variable.
 double getValue()
          Returns the value of the 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)
          Assigns a value to 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

Int

public Int()
Constructor


Int

public Int(int lowerBound,
           int upperBound)
Constructor

Parameters:
lowerBound - Variable lower bound
upperBound - Variable upper bound

Int

public Int(int value,
           int lowerBound,
           int upperBound)
Constructor

Parameters:
value - Value of the encodings.variable
lowerBound - Variable lower bound
upperBound - Variable upper bound

Int

public Int(Variable variable)
    throws JMException
Copy constructor.

Parameters:
variable - Variable to be copied.
Throws:
JMException
Method Detail

getValue

public double getValue()
Returns the value of the encodings.variable.

Overrides:
getValue in class Variable
Returns:
the value.

setValue

public void setValue(double value)
Assigns a value to the encodings.variable.

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

deepCopy

public Variable deepCopy()
Creates an exact copy of the Int object.

Specified by:
deepCopy in class Variable
Returns:
the copy.

getLowerBound

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

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

getUpperBound

public double getUpperBound()
Returns 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 value.

setUpperBound

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

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

toString

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

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