Class OSQLFunctionHeuristicPathFinderAbstract
java.lang.Object
com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
com.orientechnologies.orient.core.sql.functions.math.OSQLFunctionMathAbstract
com.orientechnologies.orient.graph.sql.functions.OSQLFunctionHeuristicPathFinderAbstract
- All Implemented Interfaces:
OSQLFunction
- Direct Known Subclasses:
OSQLFunctionAstar
Abstract class to find paths between nodes using heuristic .
- Author:
- Saeed Tabrizi (saeed a_t nowcando.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OCommandContextprotected OrientBaseGraphprotected static final floatstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected OrientVertexprotected doubleprotected com.tinkerpop.blueprints.Directionprotected String[]protected Booleanprotected HeuristicFormulaprotected longprotected Booleanprotected OrientVertexprotected Booleanprotected String[]protected static Randomprotected List<OrientVertex>Fields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
configuredParametersFields inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
maxParams, minParams, name -
Constructor Summary
ConstructorsConstructorDescriptionOSQLFunctionHeuristicPathFinderAbstract(String iName, int iMinParams, int iMaxParams) -
Method Summary
Modifier and TypeMethodDescriptionprotected BooleanbooleanOrDefault(Object fromObject, boolean defaultValue) protected DoubledoubleOrDefault(Object fromObject, double defaultValue) protected doublegetCustomHeuristicCost(String functionName, String[] vertextAxisNames, OrientVertex start, OrientVertex goal, OrientVertex current, OrientVertex parent, long depth, double dFactor) protected doublegetDiagonalHeuristicCost(double x, double y, double gx, double gy, double dFactor) protected doublegetDiagonalHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double dFactor) protected abstract doublegetDistance(OrientVertex node, OrientVertex parent, OrientVertex target) protected doublegetEuclideanHeuristicCost(double x, double y, double gx, double gy, double dFactor) protected doublegetEuclideanHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double dFactor) protected doublegetEuclideanNoSQRHeuristicCost(double x, double y, double gx, double gy, double dFactor) protected doublegetEuclideanNoSQRHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double dFactor) protected abstract doublegetHeuristicCost(OrientVertex node, OrientVertex parent, OrientVertex target) protected doublegetManhatanHeuristicCost(double x, double y, double gx, double gy, double dFactor) protected doublegetManhatanHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double dFactor) protected doublegetMaxAxisHeuristicCost(double x, double y, double gx, double gy, double dFactor) protected doublegetMaxAxisHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double dFactor) protected Set<OrientVertex>getNeighbors(OrientVertex node) protected LinkedList<OrientVertex>getPath()protected doublegetSimpleHeuristicCost(double x, double g, double dFactor) protected doublegetTieBreakingHeuristicCost(double x, double y, double sx, double sy, double gx, double gy, double heuristic) protected doublegetTieBreakingHeuristicCost(String[] axisNames, Map<String, Double> slist, Map<String, Double> clist, Map<String, Double> plist, Map<String, Double> glist, long depth, double heuristic) protected doublegetTieBreakingRandomHeuristicCost(double x, double y, double sx, double sy, double gx, double gy, double heuristic) protected IntegerintegerOrDefault(Object fromObject, int defaultValue) protected booleanprotected LonglongOrDefault(Object fromObject, long defaultValue) protected String[]stringArray(Object fromObject) protected StringstringOrDefault(Object fromObject, String defaultValue) Methods inherited from class com.orientechnologies.orient.core.sql.functions.math.OSQLFunctionMathAbstract
aggregateResults, getClassWithMorePrecision, getContextValue, shouldMergeDistributedResultMethods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionConfigurableAbstract
config, toStringMethods inherited from class com.orientechnologies.orient.core.sql.functions.OSQLFunctionAbstract
filterResult, getDistributedStorageId, getMaxParams, getMinParams, getName, getResult, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResultMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.sql.functions.OSQLFunction
execute, getSyntax
-
Field Details
-
PARAM_DIRECTION
- See Also:
-
PARAM_EDGE_TYPE_NAMES
- See Also:
-
PARAM_VERTEX_AXIS_NAMES
- See Also:
-
PARAM_PARALLEL
- See Also:
-
PARAM_MAX_DEPTH
- See Also:
-
PARAM_HEURISTIC_FORMULA
- See Also:
-
PARAM_CUSTOM_HEURISTIC_FORMULA
- See Also:
-
PARAM_D_FACTOR
- See Also:
-
PARAM_TIE_BREAKER
- See Also:
-
PARAM_EMPTY_IF_MAX_DEPTH
- See Also:
-
db
-
rnd
-
paramParallel
-
paramTieBreaker
-
paramEmptyIfMaxDepth
-
paramEdgeTypeNames
-
paramVertexAxisNames
-
paramSourceVertex
-
paramDestinationVertex
-
paramHeuristicFormula
-
paramDirection
protected com.tinkerpop.blueprints.Direction paramDirection -
paramMaxDepth
protected long paramMaxDepth -
paramDFactor
protected double paramDFactor -
paramCustomHeuristicFormula
-
context
-
route
-
MIN
protected static final float MIN- See Also:
-
-
Constructor Details
-
OSQLFunctionHeuristicPathFinderAbstract
-
-
Method Details
-
isVariableEdgeWeight
protected boolean isVariableEdgeWeight() -
getDistance
-
getHeuristicCost
protected abstract double getHeuristicCost(OrientVertex node, OrientVertex parent, OrientVertex target) -
getPath
-
getNeighbors
-
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
-
getMaxAxisHeuristicCost
-
getDiagonalHeuristicCost
-
getEuclideanHeuristicCost
-
getEuclideanNoSQRHeuristicCost
-
getTieBreakingHeuristicCost
-
stringArray
-
booleanOrDefault
-
stringOrDefault
-
integerOrDefault
-
longOrDefault
-
doubleOrDefault
-