Class OSQLFunctionHeuristicPathFinderAbstract

All Implemented Interfaces:
OSQLFunction
Direct Known Subclasses:
OSQLFunctionAstar

public abstract class OSQLFunctionHeuristicPathFinderAbstract extends OSQLFunctionMathAbstract
Abstract class to find paths between nodes using heuristic .
Author:
Saeed Tabrizi (saeed a_t nowcando.com)
  • Field Details

  • Constructor Details

    • OSQLFunctionHeuristicPathFinderAbstract

      public OSQLFunctionHeuristicPathFinderAbstract(String iName, int iMinParams, int iMaxParams)
  • Method Details

    • isVariableEdgeWeight

      protected boolean isVariableEdgeWeight()
    • getDistance

      protected abstract double getDistance(OrientVertex node, OrientVertex parent, OrientVertex target)
    • getHeuristicCost

      protected abstract double getHeuristicCost(OrientVertex node, OrientVertex parent, OrientVertex target)
    • getPath

      protected LinkedList<OrientVertex> getPath()
    • getNeighbors

      protected Set<OrientVertex> getNeighbors(OrientVertex node)
    • 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)
    • getCustomHeuristicCost

      protected double getCustomHeuristicCost(String functionName, String[] vertextAxisNames, OrientVertex start, OrientVertex goal, OrientVertex current, OrientVertex parent, long depth, 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)
    • getManhatanHeuristicCost

      protected double getManhatanHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, double dFactor)
    • getMaxAxisHeuristicCost

      protected double getMaxAxisHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, double dFactor)
    • getDiagonalHeuristicCost

      protected double getDiagonalHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, double dFactor)
    • getEuclideanHeuristicCost

      protected double getEuclideanHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, double dFactor)
    • getEuclideanNoSQRHeuristicCost

      protected double getEuclideanNoSQRHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, double dFactor)
    • getTieBreakingHeuristicCost

      protected double getTieBreakingHeuristicCost(String[] axisNames, Map<String,Double> slist, Map<String,Double> clist, Map<String,Double> plist, Map<String,Double> glist, long depth, 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)