Class SQLFunctionHeuristicPathFinderAbstract

  • All Implemented Interfaces:
    SQLFunction
    Direct Known Subclasses:
    SQLFunctionAstar

    public abstract class SQLFunctionHeuristicPathFinderAbstract
    extends SQLFunctionMathAbstract
    Abstract class to find paths between nodes using heuristic .
    Author:
    Saeed Tabrizi (saeed a_t nowcando.com)
    • Constructor Detail

      • SQLFunctionHeuristicPathFinderAbstract

        public SQLFunctionHeuristicPathFinderAbstract​(String iName,
                                                      int iMinParams,
                                                      int iMaxParams)
    • Method Detail

      • gcdist

        public double gcdist​(double lata,
                             double longa,
                             double latb,
                             double longb)
      • isVariableEdgeWeight

        protected boolean isVariableEdgeWeight()
      • getDistance

        protected abstract double getDistance​(Vertex node,
                                              Vertex parent,
                                              Vertex target)
      • getSimpleHeuristicCost

        protected double getSimpleHeuristicCost​(double x,
                                                double g,
                                                double dFactor)
      • getManhatanHeuristicCost

        protected double getManhatanHeuristicCost​(double x,
                                                  double y,
                                                  double gx,
                                                  double gy,
                                                  double dFactor)
      • getMaxAxisHeuristicCost

        protected double getMaxAxisHeuristicCost​(double x,
                                                 double y,
                                                 double gx,
                                                 double gy,
                                                 double dFactor)
      • getDiagonalHeuristicCost

        protected double getDiagonalHeuristicCost​(double x,
                                                  double y,
                                                  double gx,
                                                  double gy,
                                                  double dFactor)
      • getEuclideanHeuristicCost

        protected double getEuclideanHeuristicCost​(double x,
                                                   double y,
                                                   double gx,
                                                   double gy,
                                                   double dFactor)
      • getEuclideanNoSQRHeuristicCost

        protected double getEuclideanNoSQRHeuristicCost​(double x,
                                                        double y,
                                                        double gx,
                                                        double gy,
                                                        double dFactor)
      • getTieBreakingHeuristicCost

        protected double getTieBreakingHeuristicCost​(double x,
                                                     double y,
                                                     double sx,
                                                     double sy,
                                                     double gx,
                                                     double gy,
                                                     double heuristic)
      • getTieBreakingRandomHeuristicCost

        protected double getTieBreakingRandomHeuristicCost​(double x,
                                                           double y,
                                                           double sx,
                                                           double sy,
                                                           double gx,
                                                           double gy,
                                                           double heuristic)
      • stringArray

        protected String[] stringArray​(Object fromObject)
      • booleanOrDefault

        protected Boolean booleanOrDefault​(Object fromObject,
                                           boolean defaultValue)
      • stringOrDefault

        protected String stringOrDefault​(Object fromObject,
                                         String defaultValue)
      • integerOrDefault

        protected Integer integerOrDefault​(Object fromObject,
                                           int defaultValue)
      • longOrDefault

        protected Long longOrDefault​(Object fromObject,
                                     long defaultValue)
      • doubleOrDefault

        protected Double doubleOrDefault​(Object fromObject,
                                         double defaultValue)