|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmetal.util.DistanceNode
public class DistanceNode
This is an auxiliar class for calculating the SPEA2 environmental selection.
Each instance of DistanceNode contains two parameter called
reference_
and distance_
.
reference_
indicates one Solution
in a
SolutionSet
and distance_
represents the distance_
to this solution.
Constructor Summary | |
---|---|
DistanceNode(double distance,
int reference)
Constructor. |
Method Summary | |
---|---|
double |
getDistance()
Gets the distance |
int |
getReference()
Gets the reference |
void |
setDistance(double distance)
Sets the distance to a Solution |
void |
setReferece(int reference)
Sets the reference to a Solution |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DistanceNode(double distance, int reference)
distance
- The distance to a Solution
.reference
- The position of the Solution
.Method Detail |
---|
public void setDistance(double distance)
Solution
distance
- The distancepublic void setReferece(int reference)
Solution
reference
- The referencepublic double getDistance()
public int getReference()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |