public class ArrayDoubleSolution extends Object implements DoubleSolution
DoubleSolution using arrays.| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Object> |
attributes |
protected DoubleProblem |
problem |
protected JMetalRandom |
randomGenerator |
| Constructor and Description |
|---|
ArrayDoubleSolution(ArrayDoubleSolution solution)
Copy constructor
|
ArrayDoubleSolution(DoubleProblem problem)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Solution<Double> |
copy() |
boolean |
equals(Object o) |
Object |
getAttribute(Object id) |
Double |
getLowerBound(int index) |
int |
getNumberOfObjectives() |
int |
getNumberOfVariables() |
double |
getObjective(int index) |
Double |
getUpperBound(int index) |
Double |
getVariableValue(int index) |
String |
getVariableValueString(int index) |
int |
hashCode() |
void |
setAttribute(Object id,
Object value) |
void |
setObjective(int index,
double value) |
void |
setVariableValue(int index,
Double value) |
protected DoubleProblem problem
protected final JMetalRandom randomGenerator
public ArrayDoubleSolution(DoubleProblem problem)
public ArrayDoubleSolution(ArrayDoubleSolution solution)
solution - to copypublic void setObjective(int index,
double value)
setObjective in interface Solution<Double>public double getObjective(int index)
getObjective in interface Solution<Double>public Double getVariableValue(int index)
getVariableValue in interface Solution<Double>public void setVariableValue(int index,
Double value)
setVariableValue in interface Solution<Double>public String getVariableValueString(int index)
getVariableValueString in interface Solution<Double>public int getNumberOfVariables()
getNumberOfVariables in interface Solution<Double>public int getNumberOfObjectives()
getNumberOfObjectives in interface Solution<Double>public Double getUpperBound(int index)
getUpperBound in interface DoubleSolutionpublic Double getLowerBound(int index)
getLowerBound in interface DoubleSolutionpublic void setAttribute(Object id, Object value)
setAttribute in interface Solution<Double>public Object getAttribute(Object id)
getAttribute in interface Solution<Double>Copyright © 2017. All rights reserved.