Class Statistic


  • public class Statistic
    extends java.lang.Object
    A class to calculate various statistics.
    • Constructor Detail

      • Statistic

        public Statistic()
    • Method Detail

      • getTraceLength

        public double getTraceLength()
        Returns:
        The length of the trace, the Searcher ran yet.
      • getLocalOptimalSolution

        public double getLocalOptimalSolution()
        Get the locally optimal trace length for the searcher. That's the trace length of the path visited plus the optimal distance between the last searcher position and the treasure.
        Returns:
        locally optimal trace length
      • getGlobalStartPoint

        public org.locationtech.jts.geom.Point getGlobalStartPoint()
        Returns:
        The Point where the Searcher stood initially.
      • getTreasureLocation

        public org.locationtech.jts.geom.Point getTreasureLocation()
        Returns:
        the Point, where the treasure is located.
      • getGlobalOptimalSolution

        public double getGlobalOptimalSolution()
        Returns:
        the distance of the beeline between the Searcher's initial position and the treasure location.
      • getSolutionQuotient

        public double getSolutionQuotient()
        Calculate the solution quotient. This is the quotient between the local and the global trace length optimum.
        Returns:
        solution quotient
      • getHintRequests

        public int getHintRequests()
        Returns:
        The number of Hint's, the Searcher got yet.
      • calculate

        public java.util.List<StatisticObject> calculate​(java.util.List<Turn> turns,
                                                         boolean finished)
        Parameters:
        turns - a list, containing Turn objects.
        finished - telling, whether the game is finished yet.
        Returns:
        A list, containing StatisticObject's.