Class BalancedWeightApproximator

java.lang.Object
com.graphhopper.routing.weighting.BalancedWeightApproximator

public class BalancedWeightApproximator extends Object
Turns an unidirectional weight Approximation into a bidirectional balanced one. This means it can be used with an A* implementation that uses the stopping criterion described in [1]. Note: In the paper, it is called a consistent (rather than balanced) approximator, but as noted in [2], consistent also means a different property which an approximator must already have before it should be plugged into this class (!). Most literature uses balanced for the property that this class is about.

[1] Ikeda, T., Hsu, M.-Y., Imai, H., Nishimura, S., Shimoura, H., Hashimoto, T., Tenmoku, K., and Mitoh, K. (1994). A fast algorithm for finding better routes by ai search techniques. In VNIS, pages 291–296. [2] Pijls, W.H.L.M, & Post, H. (2008). A new bidirectional algorithm for shortest paths (No. EI 2008-25). Report / Econometric Institute, Erasmus University Rotterdam

Author:
jansoe, Peter Karich
  • Constructor Details

    • BalancedWeightApproximator

      public BalancedWeightApproximator(WeightApproximator weightApprox)
  • Method Details

    • getApproximation

      public WeightApproximator getApproximation()
    • setFromTo

      public void setFromTo(int from, int to)
    • approximate

      public double approximate(int node, boolean reverse)
    • getSlack

      public double getSlack()
    • toString

      public String toString()
      Overrides:
      toString in class Object