Class OSQLFunctionPathFinder

All Implemented Interfaces:
OSQLFunction
Direct Known Subclasses:
OSQLFunctionDijkstra

public abstract class OSQLFunctionPathFinder extends OSQLFunctionMathAbstract
Abstract class to find paths between nodes.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Field Details

  • Constructor Details

    • OSQLFunctionPathFinder

      public OSQLFunctionPathFinder(String iName, int iMinParams, int iMaxParams)
  • Method Details

    • execute

      protected LinkedList<OVertex> execute(OCommandContext iContext)
    • isVariableEdgeWeight

      protected boolean isVariableEdgeWeight()
    • getPath

      public LinkedList<OVertex> getPath()
    • aggregateResults

      public boolean aggregateResults()
      Description copied from interface: OSQLFunction
      A 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:
      aggregateResults in interface OSQLFunction
      Overrides:
      aggregateResults in class OSQLFunctionMathAbstract
      Returns:
      true if function aggregate results
    • getResult

      public Object getResult()
      Description copied from interface: OSQLFunction
      Only called when function aggregates results after all records have been passed to the function.
      Specified by:
      getResult in interface OSQLFunction
      Overrides:
      getResult in class OSQLFunctionAbstract
      Returns:
      Aggregation result
    • findMinimalDistances

      protected void findMinimalDistances(OVertex node)
    • getNeighbors

      protected Set<OVertex> getNeighbors(OVertex node)
    • getMinimum

      protected OVertex getMinimum(Set<OVertex> vertexes)
    • isNotSettled

      protected boolean isNotSettled(OVertex vertex)
    • continueTraversing

      protected boolean continueTraversing()
    • getShortestDistance

      protected float getShortestDistance(OVertex destination)
    • sumDistances

      protected float sumDistances(float iDistance1, float iDistance2)
    • getDistance

      protected abstract float getDistance(OVertex node, OVertex target)