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.core.sql.functions.graph.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 static final floatprotected OVertexprotected ODirectionprotected OVertexFields 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<OVertex> execute(OCommandContext iContext) protected voidfindMinimalDistances(OVertex node) protected abstract floatgetDistance(OVertex node, OVertex target) protected OVertexgetMinimum(Set<OVertex> vertexes) getNeighbors(OVertex node) getPath()Only called when function aggregates results after all records have been passed to the function.protected floatgetShortestDistance(OVertex destination) protected booleanisNotSettled(OVertex 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
-
unSettledNodes
-
predecessors
-
distance
-
paramSourceVertex
-
paramDestinationVertex
-
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
-