java.lang.Object
org.cicirello.search.problems.tsp.BaseTSP
All Implemented Interfaces:
Problem<Permutation>
Direct Known Subclasses:
RandomTSPMatrix, TSP

public abstract class BaseTSP extends Object implements Problem<Permutation>
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 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.