Class OSQLFunctionPathFinder
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.OSQLFunctionPathFinder
- All Implemented Interfaces:
OSQLFunction
- Direct Known Subclasses:
OSQLFunctionDijkstra
Abstract class to find paths between nodes.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OCommandContextprotected OrientBaseGraphprotected static final floatprotected OrientVertexprotected com.tinkerpop.blueprints.Directionprotected OrientVertexprotected Map<ORID,OrientVertex> protected Set<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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanA function can make calculation on several records before returning a result.protected booleanprotected LinkedList<OrientVertex>execute(OCommandContext iContext) protected voidprotected abstract floatgetDistance(OrientVertex node, OrientVertex target) protected OrientVertexgetMinimum(Set<OrientVertex> vertexes) protected Set<OrientVertex>getNeighbors(com.tinkerpop.blueprints.Vertex node) getPath()Only called when function aggregates results after all records have been passed to the function.protected floatgetShortestDistance(OrientVertex destination) protected booleanisNotSettled(OrientVertex vertex) protected booleanprotected floatsumDistances(float iDistance1, float iDistance2) Methods 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, 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
-
db
-
unSettledNodes
-
predecessors
-
distance
-
paramSourceVertex
-
paramDestinationVertex
-
paramDirection
protected com.tinkerpop.blueprints.Direction paramDirection -
context
-
MIN
protected static final float MIN- See Also:
-
-
Constructor Details
-
OSQLFunctionPathFinder
-
-
Method Details
-
execute
-
isVariableEdgeWeight
protected boolean isVariableEdgeWeight() -
getPath
-
aggregateResults
public boolean aggregateResults()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
-
getResult
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
-
findMinimalDistances
-
getNeighbors
-
getMinimum
-
isNotSettled
-
continueTraversing
protected boolean continueTraversing() -
getShortestDistance
-
sumDistances
protected float sumDistances(float iDistance1, float iDistance2) -
getDistance
-