java.lang.Object
org.cicirello.search.problems.tsp.BaseTSP
- All Implemented Interfaces:
Problem<Permutation>
- Direct Known Subclasses:
RandomTSPMatrix
,TSP
This class serves as an abstract base class for the various classes that implement variations of
the Traveling Salesperson Problem provided by the library. See the documentation for the rest of
the hierarchy for details of how they differ. The purpose of this abstract base class is
primarily to provide the minimum common functionality required by the constructive heuristics for
the TSP.
-
Method Summary
Modifier and TypeMethodDescriptionabstract int
length()
Gets the number of cities in this instance of the TSP.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cicirello.search.problems.Problem
costAsDouble, getSolutionCostPair
-
Method Details
-
length
public abstract int length()Gets the number of cities in this instance of the TSP.- Returns:
- the number of cities in the problem.
-