Class OSQLFunctionAstar
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
com.orientechnologies.orient.graph.sql.functions.OSQLFunctionAstar
- All Implemented Interfaces:
OSQLFunction
Deprecated.
A*'s algorithm describes how to find the cheapest path from one node to another node in a
directed weighted graph with husrestic function.
The first parameter is source record. The second parameter is destination record. The third parameter is a name of property that represents 'weight' and fourth represnts the map of options.
If property is not defined in edge or is null, distance between vertexes are 0 .
- Author:
- Saeed Tabrizi (saeed a_t nowcando.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<OrientVertex,OrientVertex> Deprecated.protected Set<OrientVertex>Deprecated.protected Map<OrientVertex,Double> Deprecated.protected Map<OrientVertex,Double> Deprecated.static final StringDeprecated.protected PriorityQueue<OrientVertex>Deprecated.Fields inherited from class com.orientechnologies.orient.graph.sql.functions.OSQLFunctionHeuristicPathFinderAbstract
context, db, MIN, PARAM_CUSTOM_HEURISTIC_FORMULA, PARAM_D_FACTOR, PARAM_DIRECTION, PARAM_EDGE_TYPE_NAMES, PARAM_EMPTY_IF_MAX_DEPTH, PARAM_HEURISTIC_FORMULA, PARAM_MAX_DEPTH, PARAM_PARALLEL, PARAM_TIE_BREAKER, PARAM_VERTEX_AXIS_NAMES, paramCustomHeuristicFormula, paramDestinationVertex, paramDFactor, paramDirection, paramEdgeTypeNames, paramEmptyIfMaxDepth, paramHeuristicFormula, paramMaxDepth, paramParallel, paramSourceVertex, paramTieBreaker, paramVertexAxisNames, rnd, routeFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.A function can make calculation on several records before returning a result.execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] iParams, OCommandContext iContext) Deprecated.Process a record.protected doublegetDistance(OrientEdge edge) Deprecated.protected doublegetDistance(OrientVertex node, OrientVertex parent, OrientVertex target) Deprecated.protected doublegetHeuristicCost(OrientVertex node, OrientVertex parent, OrientVertex target) Deprecated.protected Set<OrientEdge>getNeighborEdges(OrientVertex node) Deprecated.Deprecated.Only called when function aggregates results after all records have been passed to the function.Deprecated.Returns a convenient SQL String representation of the function.protected booleanDeprecated.Methods inherited from class com.orientechnologies.orient.graph.sql.functions.OSQLFunctionHeuristicPathFinderAbstract
booleanOrDefault, doubleOrDefault, getCustomHeuristicCost, getDiagonalHeuristicCost, getDiagonalHeuristicCost, getEuclideanHeuristicCost, getEuclideanHeuristicCost, getEuclideanNoSQRHeuristicCost, getEuclideanNoSQRHeuristicCost, getManhatanHeuristicCost, getManhatanHeuristicCost, getMaxAxisHeuristicCost, getMaxAxisHeuristicCost, getNeighbors, getPath, getSimpleHeuristicCost, getTieBreakingHeuristicCost, getTieBreakingHeuristicCost, getTieBreakingRandomHeuristicCost, integerOrDefault, longOrDefault, stringArray, stringOrDefaultMethods inherited from class com.orientechnologies.orient.core.sql.functions.math.OSQLFunctionMathAbstract
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, getSingleItem, getSingleProperty, mergeDistributedResult, returnDistributedResult, setResult
-
Field Details
-
NAME
Deprecated.- See Also:
-
closedSet
Deprecated. -
cameFrom
Deprecated. -
gScore
Deprecated. -
fScore
Deprecated. -
open
Deprecated.
-
-
Constructor Details
-
OSQLFunctionAstar
public OSQLFunctionAstar()Deprecated.
-
-
Method Details
-
execute
public LinkedList<OrientVertex> execute(Object iThis, OIdentifiable iCurrentRecord, Object iCurrentResult, Object[] iParams, OCommandContext iContext) Deprecated.Description copied from interface:OSQLFunctionProcess a record.iCurrentRecord- : current recordiCurrentResult- TODOiParams- : function parameters, number is ensured to be within minParams and maxParams.iContext- : object calling this function- Returns:
- function result, can be null. Special cases : can be null if function aggregate results, can be null if function filter results : this mean result is excluded
-
getNeighborEdges
Deprecated. -
getSyntax
Deprecated.Description copied from interface:OSQLFunctionReturns a convenient SQL String representation of the function.Example :
myFunction( param1, param2, [optionalParam3])
This text will be used in exception messages.
- Returns:
- String , never null.
-
getResult
Deprecated.Description copied from interface:OSQLFunctionOnly called when function aggregates results after all records have been passed to the function.- Specified by:
getResultin interfaceOSQLFunction- Overrides:
getResultin classOSQLFunctionAbstract- Returns:
- Aggregation result
-
getDistance
Deprecated.- Specified by:
getDistancein classOSQLFunctionHeuristicPathFinderAbstract
-
getDistance
Deprecated. -
aggregateResults
public boolean aggregateResults()Deprecated.Description copied from interface:OSQLFunctionA function can make calculation on several records before returning a result.Example of such function : sum, count, max, min ...
The final result of the aggregation is obtain by calling
OSQLFunction.getResult()- Specified by:
aggregateResultsin interfaceOSQLFunction- Overrides:
aggregateResultsin classOSQLFunctionMathAbstract- Returns:
- true if function aggregate results
-
getHeuristicCost
Deprecated.- Specified by:
getHeuristicCostin classOSQLFunctionHeuristicPathFinderAbstract
-
isVariableEdgeWeight
protected boolean isVariableEdgeWeight()Deprecated.- Overrides:
isVariableEdgeWeightin classOSQLFunctionHeuristicPathFinderAbstract
-
OSQLFunctionAstarinstead