Class RoutinesFromPaper


  • public class RoutinesFromPaper
    extends java.lang.Object
    For an explanation what each method does, it is recommended to look in the paper ("Deterministic Treasure Hunt in the Plane with Angular Hints" from Bouchard et al.). There the same symbols are used. The functionality of rectangleScan is explained there on page 3. Phi, rho, sigma and the basic-transformation are explained on pages 7ff.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static SearchPath meanderThroughLines​(org.locationtech.jts.geom.Point[] a, org.locationtech.jts.geom.Point[] b, int k, SearchPath searchPath)  
      static SearchPath rectangleScan​(org.locationtech.jts.geom.Coordinate A, org.locationtech.jts.geom.Coordinate B, org.locationtech.jts.geom.Coordinate C, org.locationtech.jts.geom.Coordinate D, SearchPath searchPath, org.locationtech.jts.geom.Point lastPosition)  
      static SearchPath rectangleScan​(org.locationtech.jts.geom.Point A, org.locationtech.jts.geom.Point B, org.locationtech.jts.geom.Point C, org.locationtech.jts.geom.Point D, SearchPath searchPath, org.locationtech.jts.geom.Point lastPosition)
      Does the same as the routine RectangleScan in the paper.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rectangleScan

        public static SearchPath rectangleScan​(org.locationtech.jts.geom.Point A,
                                               org.locationtech.jts.geom.Point B,
                                               org.locationtech.jts.geom.Point C,
                                               org.locationtech.jts.geom.Point D,
                                               SearchPath searchPath,
                                               org.locationtech.jts.geom.Point lastPosition)
        Does the same as the routine RectangleScan in the paper. It adds the Points to searchPath so that the player sees all points in the rectangle ABCD. Unlike the paper it does not add the point where the procedure started to the search-path.
        Parameters:
        A - a corner of the rectangle which is to be scanned, neighboring d and b
        B - a corner of the rectangle which is to be scanned, neighboring a and c
        C - a corner of the rectangle which is to be scanned, neighboring b and d
        D - a corner of the rectangle which is to be scanned, neighboring c and a
        searchPath - the searchPath the rectangle scan path gets added to
        lastPosition - when the searchPath is empty, it is assumed that this was the point where the procedure rectangleScan got started and the searcher returns there afterwards
        Returns:
        the search-path with the added scan
      • meanderThroughLines

        public static SearchPath meanderThroughLines​(org.locationtech.jts.geom.Point[] a,
                                                     org.locationtech.jts.geom.Point[] b,
                                                     int k,
                                                     SearchPath searchPath)