|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmetal.core.Variable
jmetal.encodings.variable.ArrayInt
public class ArrayInt
Class implementing a decision encodings.variable representing an array of integers. The integer values of the array have their own bounds.
| Field Summary | |
|---|---|
int[] |
array_
Stores an array of integer values |
| Constructor Summary | |
|---|---|
ArrayInt()
Constructor |
|
ArrayInt(int size)
Constructor |
|
ArrayInt(int size,
double[] lowerBounds,
double[] upperBounds)
Constructor |
|
ArrayInt(int size,
Problem problem)
Constructor |
|
| Method Summary | |
|---|---|
Variable |
deepCopy()
Creates an exact copy of a Variable object. |
int |
getLength()
Returns the length of the arrayInt. |
double |
getLowerBound(int index)
Get the lower bound of a value |
double |
getUpperBound(int index)
Get the upper bound of a value |
int |
getValue(int index)
getValue |
void |
setValue(int index,
int value)
setValue |
java.lang.String |
toString()
Returns a string representing the object |
| Methods inherited from class jmetal.core.Variable |
|---|
getLowerBound, getUpperBound, getValue, getVariableType, setLowerBound, setUpperBound, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public int[] array_
| Constructor Detail |
|---|
public ArrayInt()
public ArrayInt(int size)
size - Size of the array
public ArrayInt(int size,
Problem problem)
size - Size of the array
public ArrayInt(int size,
double[] lowerBounds,
double[] upperBounds)
size - The size of the arraylowerBounds - Lower boundsupperBounds - Upper bounds| Method Detail |
|---|
public Variable deepCopy()
VariableVariable object.
deepCopy in class Variablepublic int getLength()
public int getValue(int index)
throws JMException
index - Index of value to be returned
JMException
public void setValue(int index,
int value)
throws JMException
index - Index of value to be returnedvalue - The value to be set in position index
JMException
public double getLowerBound(int index)
throws JMException
index - The index of the value
JMException
public double getUpperBound(int index)
throws JMException
index - The index of the value
JMExceptionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||