Class InsertNeighborhood
java.lang.Object
es.urjc.etsii.grafo.solution.neighborhood.Neighborhood<InsertNeighborhood.InsertMove,TSPSolution,TSPInstance>
es.urjc.etsii.grafo.TSP.model.neighs.InsertNeighborhood
public class InsertNeighborhood
extends Neighborhood<InsertNeighborhood.InsertMove,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
-
InsertNeighborhood
public InsertNeighborhood()
-
-
Method Details
-
explore
public ExploreResult<InsertNeighborhood.InsertMove,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<InsertNeighborhood.InsertMove,
TSPSolution, TSPInstance> - Parameters:
solution
- Solution used to generate the neighborhood- Returns:
- Stream with all the available moves in the neighborhood
-