|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmetal.core.Variable
jmetal.encodings.variable.Binary
jmetal.encodings.variable.BinaryReal
public class BinaryReal
This class extends the Binary class to represent a Real encodings.variable encoded by a binary string
| Field Summary | |
|---|---|
static int |
DEFAULT_PRECISION
Defines the default number of bits used for binary coded variables. |
| Fields inherited from class jmetal.encodings.variable.Binary |
|---|
bits_, numberOfBits_ |
| Constructor Summary | |
|---|---|
BinaryReal()
Constructor. |
|
BinaryReal(BinaryReal variable)
Copy constructor |
|
BinaryReal(java.util.BitSet bits,
int nbBits,
double lowerBound,
double upperBound)
|
|
BinaryReal(int numberOfBits,
double lowerBound,
double upperBound)
Constructor |
|
| Method Summary | |
|---|---|
void |
decode()
Decodes the real value encoded in the binary string represented by the BinaryReal object. |
Variable |
deepCopy()
Creates an exact copy of a BinaryReal 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 double 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)
This implementation is efficient for binary string of length up to 24 bits, and for positive intervals. |
java.lang.String |
toString()
Returns a string representing the object. |
| Methods inherited from class jmetal.encodings.variable.Binary |
|---|
getIth, getNumberOfBits, hammingDistance, setIth |
| 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 |
| Field Detail |
|---|
public static final int DEFAULT_PRECISION
| Constructor Detail |
|---|
public BinaryReal()
public BinaryReal(int numberOfBits,
double lowerBound,
double upperBound)
numberOfBits - Length of the binary string.lowerBound - The lower limit for the encodings.variableupperBound - The upper limit for the encodings.variable.
public BinaryReal(java.util.BitSet bits,
int nbBits,
double lowerBound,
double upperBound)
bits - BitSetnbBits - Number of bitslowerBound - Lower boundupperBound - Upper boundpublic BinaryReal(BinaryReal variable)
variable - The encodings.variable to copy| Method Detail |
|---|
public void decode()
BinaryReal object. The decoded value is stores in the
value_ field and can be accessed by the method
getValue.
decode in class Binarypublic double getValue()
getValue in class Variable
public void setValue(double value)
throws JMException
setValue in class VariableJMExceptionContributor: jl hippolytepublic Variable deepCopy()
BinaryReal object.
deepCopy in class Binarypublic double getLowerBound()
getLowerBound in class Variablepublic double getUpperBound()
getUpperBound in class Variablepublic void setLowerBound(double lowerBound)
setLowerBound in class VariablelowerBound - the lower bound.public void setUpperBound(double upperBound)
setUpperBound in class VariableupperBound - the upper bound.public java.lang.String toString()
toString in class Binary
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||