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.core.sql.functions.graph.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 static final floatstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected Stringprotected OVertexprotected doubleprotected ODirectionprotected String[]protected Booleanprotected HeuristicFormulaprotected longprotected Booleanprotected OVertexprotected Booleanprotected String[]protected static RandomFields 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, OVertex start, OVertex goal, OVertex current, OVertex parent, long depth, double dFactor, OCommandContext ctx) 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(OVertex node, OVertex parent, OVertex 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(OVertex node, OVertex parent, OVertex target, OCommandContext iContext) 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) getNeighbors(OVertex node) protected LinkedList<OVertex> 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:
-
rnd
-
paramParallel
-
paramTieBreaker
-
paramEmptyIfMaxDepth
-
paramEdgeTypeNames
-
paramVertexAxisNames
-
paramSourceVertex
-
paramDestinationVertex
-
paramHeuristicFormula
-
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(OVertex node, OVertex parent, OVertex target, OCommandContext iContext) -
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
-
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
-