MOEA Framework 2.12
API Specification

org.moeaframework.algorithm
Class SPEA2.MutableDistanceMap

java.lang.Object
  extended by org.moeaframework.algorithm.SPEA2.MutableDistanceMap
Enclosing class:
SPEA2

public static class SPEA2.MutableDistanceMap
extends Object

Mapping of pair-wise distances between points. This mapping is mutable, allowing points to be removed.


Constructor Summary
SPEA2.MutableDistanceMap(double[][] rawDistanceMatrix)
          Constructs a new mapping of pair-wise distances between points.
 
Method Summary
 int findMostCrowdedPoint()
          Returns the most crowded point according to SPEA2's truncation strategy.
protected  void initialize(double[][] rawDistanceMatrix)
          Initializes the internal data structures.
 void removePoint(int index)
          Removes the point with the given index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPEA2.MutableDistanceMap

public SPEA2.MutableDistanceMap(double[][] rawDistanceMatrix)
Constructs a new mapping of pair-wise distances between points.

Parameters:
rawDistanceMatrix - the distance matrix
Method Detail

initialize

protected void initialize(double[][] rawDistanceMatrix)
Initializes the internal data structures.

Parameters:
rawDistanceMatrix - the distance matrix

findMostCrowdedPoint

public int findMostCrowdedPoint()
Returns the most crowded point according to SPEA2's truncation strategy. The most crowded point is the point with the smallest distance to its nearest neighbor. Ties are broken by looking at the next nearest neighbor repeatedly until a difference is found.

Returns:
the index of the most crowded point

removePoint

public void removePoint(int index)
Removes the point with the given index.

Parameters:
index - the index to remove

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!