Class SwapNeighborhood
java.lang.Object
es.urjc.etsii.grafo.solution.neighborhood.Neighborhood<SwapNeighborhood.SwapMove,TSPSolution,TSPInstance>
es.urjc.etsii.grafo.TSP.model.neighs.SwapNeighborhood
public class SwapNeighborhood
extends Neighborhood<SwapNeighborhood.SwapMove,TSPSolution,TSPInstance>
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class es.urjc.etsii.grafo.solution.neighborhood.Neighborhood
UNKNOWN_SIZE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexplore
(TSPSolution solution) Build an exhaustive stream that allows iterating the whole neighborhood Using a stream is more efficient that a list as moves are only generated if they are neededMethods inherited from class es.urjc.etsii.grafo.solution.neighborhood.Neighborhood
concat, empty, interleave, neighborhoodSize, random, toString
-
Constructor Details
-
SwapNeighborhood
public SwapNeighborhood()
-
-
Method Details
-
explore
public ExploreResult<SwapNeighborhood.SwapMove,TSPSolution, exploreTSPInstance> (TSPSolution solution) Description copied from class:Neighborhood
Build an exhaustive stream that allows iterating the whole neighborhood Using a stream is more efficient that a list as moves are only generated if they are needed- Specified by:
explore
in classNeighborhood<SwapNeighborhood.SwapMove,
TSPSolution, TSPInstance> - Parameters:
solution
- Solution used to generate the neighborhood- Returns:
- Stream with all the available moves in the neighborhood
-