Class LastHintBadSubroutine


  • public class LastHintBadSubroutine
    extends java.lang.Object
    Implements the "else"-part of the first if-condition in Algorithm 3 (Function ReduceRectangle(R)) in the paper "Deterministic Treasure Hunt in the Plane with Angular Hints" from Bouchard et al.
    • Constructor Detail

      • LastHintBadSubroutine

        public LastHintBadSubroutine​(StrategyFromPaper strategy)
    • Method Detail

      • lastHintBadSubroutine

        public SearchPath lastHintBadSubroutine​(HalfPlaneHint currentHint,
                                                HalfPlaneHint lastBadHint,
                                                SearchPath move,
                                                boolean changeABCD)
        If the last hint was bad, this function can be called and lastBadHint has to be set accordingly. The function equals the "else"-part of the first if-condition in Algorithm 3 (Function ReduceRectangle(R)) in the paper.
        Parameters:
        currentHint - the hint gotten last by the calling strategy
        lastBadHint - the hint gotten before the currentHint by the calling strategy
        move - the move the steps get added to
        changeABCD - true if ABCD should be changed, false if the strategy does so by itself
        Returns:
        The move to scan various areas so that A,B,C and D can be updated to a smaller rectangle (or the treasure is found)
      • getBasicTransformation

        public int getBasicTransformation()
      • getCurrentRectangle

        public org.locationtech.jts.geom.Coordinate[] getCurrentRectangle()
      • getL1DoubleApos

        public org.locationtech.jts.geom.LineSegment getL1DoubleApos()