Class KNearestNeighborhood<S extends Solution<?>>
java.lang.Object
org.uma.jmetal.util.neighborhood.impl.KNearestNeighborhood<S>
- Type Parameters:
S-
- All Implemented Interfaces:
Serializable,Neighborhood<S>
This class implements a neighborhood that select the k-nearest solutions according to a
distance measure. By default, the Euclidean distance between objectives is used.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.uma.jmetal.util.neighborhood.Neighborhood
Neighborhood.NeighborType -
Constructor Summary
ConstructorsConstructorDescriptionKNearestNeighborhood(int neighborSize) KNearestNeighborhood(int neighborSize, Distance<S, S> distance) -
Method Summary
-
Constructor Details
-
KNearestNeighborhood
public KNearestNeighborhood(int neighborSize) -
KNearestNeighborhood
-
-
Method Details
-
getNeighbors
- Specified by:
getNeighborsin interfaceNeighborhood<S extends Solution<?>>
-