Search Results for

    Show / Hide Table of Contents

    Class DijkstraShortestDistanceTreeFinder

    A IShortestDistanceTreeFinder implementation based on the Dijkstra algorithm.

    Inheritance
    System.Object
    DijkstraShortestDistanceTreeFinder
    Implements
    IShortestDistanceTreeFinder
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: MoreStructures.Graphs.ShortestDistanceTree
    Assembly: MoreStructures.dll
    Syntax
    public class DijkstraShortestDistanceTreeFinder : IShortestDistanceTreeFinder
    Remarks

    REQUIREMENTS
    - Same as DijkstraShortestDistanceFinder.

    ALGORITHM
    - The algorithm closely resembles the one used in DijkstraShortestDistanceFinder, with the following differences. Check that algorithm for further information.
    - The main loop is only stopped when all vertices have been processed, instead of being stopped as soon as the end vertex is found, and its shortest distance and path calculated.
    - The path from the start vertex is not reconstructed, since that would need to be done for each of the vertices of the graph, resulting in a worst case O(v^2) Space Complexity.

    COMPLEXITY
    - Same analysis as in DijkstraShortestDistanceFinder.
    - The fact that the algorithm doesn't stop when a specific vertex is found, but goes through all vertices, has an impact on the average performance, but doesn't affect the worst case scenario, since in the worst case the end vertex is the last vertex processed of the graph.
    - Therefore, as in single path Dijkstra's algorithm variant, Time Complexity is O(e + v * log(v)) with the best available IUpdatablePriorityQueue<T> implementation (UpdatableFibonacciHeapPriorityQueue<T>), O((e + v) * log(v)) when using a UpdatableBinaryHeapPriorityQueue<T> and O((e + v) * v) when using the naive implementation of ArrayListPriorityQueue<T>.
    - Space Complexity is O(v), since all auxiliary structures contain a number of items proportional to v.

    Constructors

    | Improve this Doc View Source

    DijkstraShortestDistanceTreeFinder(Func<IUpdatablePriorityQueue<Int32>>)

    Declaration
    public DijkstraShortestDistanceTreeFinder(Func<IUpdatablePriorityQueue<int>> priorityQueueBuilder)
    Parameters
    Type Name Description
    Func<IUpdatablePriorityQueue<System.Int32>> priorityQueueBuilder

    A builder of a IUpdatablePriorityQueue<T> of System.Int32 values, used by the algorithm to store edges with priority from the closest to the start, to the farthest.

    Methods

    | Improve this Doc View Source

    FindTree(IGraph, IGraphDistances, Int32)

    Declaration
    public BestPreviouses FindTree(IGraph graph, IGraphDistances distances, int start)
    Parameters
    Type Name Description
    IGraph graph
    IGraphDistances distances
    System.Int32 start
    Returns
    Type Description
    BestPreviouses
    Remarks

    Implements

    IShortestDistanceTreeFinder

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX