Class RoutinesFromPaper
- java.lang.Object
-
- com.treasure.hunt.strategy.searcher.impl.strategyFromPaper.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.
-
-
-
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 bB
- a corner of the rectangle which is to be scanned, neighboring a and cC
- a corner of the rectangle which is to be scanned, neighboring b and dD
- a corner of the rectangle which is to be scanned, neighboring c and asearchPath
- the searchPath the rectangle scan path gets added tolastPosition
- 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
-
rectangleScan
public 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)
-
meanderThroughLines
public static SearchPath meanderThroughLines(org.locationtech.jts.geom.Point[] a, org.locationtech.jts.geom.Point[] b, int k, SearchPath searchPath)
-
-