Dijkstra Type

Computes Dijkstra's shortest path

Constructors

Constructor Description

Dijkstra()

Full Usage: Dijkstra()

Returns: Dijkstra
Returns: Dijkstra

Static members

Static member Description

Dijkstra.compute (starting, getEdgeWeight, graph)

Full Usage: Dijkstra.compute (starting, getEdgeWeight, graph)

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'a, 'EdgeData>

Returns: ('NodeKey * float)[]
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>
Returns: ('NodeKey * float)[]

Dijkstra.compute (starting, graph)

Full Usage: Dijkstra.compute (starting, graph)

Parameters:
    starting : 'NodeKey
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.compute (starting, graph)

Full Usage: Dijkstra.compute (starting, graph)

Parameters:
    starting : 'NodeKey
    graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.computeBetween (origin, destination, graph)

Full Usage: Dijkstra.computeBetween (origin, destination, graph)

Parameters:
    origin : 'NodeKey
    destination : 'NodeKey
    graph : DiGraph<'NodeKey, 'NodeData, float>

Returns: 'a
origin : 'NodeKey
destination : 'NodeKey
graph : DiGraph<'NodeKey, 'NodeData, float>
Returns: 'a

Dijkstra.computeBetween (origin, destination, graph)

Full Usage: Dijkstra.computeBetween (origin, destination, graph)

Parameters:
    origin : 'NodeKey
    destination : 'NodeKey
    graph : FGraph<'NodeKey, 'NodeData, float>

Returns: 'a
origin : 'NodeKey
destination : 'NodeKey
graph : FGraph<'NodeKey, 'NodeData, float>
Returns: 'a

Dijkstra.computeWithEdgeData (starting, graph)

Full Usage: Dijkstra.computeWithEdgeData (starting, graph)

Parameters:
    starting : 'NodeKey
    graph : AdjGraph<'NodeKey, 'NodeData, float>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
graph : AdjGraph<'NodeKey, 'NodeData, float>
Returns: Dictionary<'NodeKey, float>

Dijkstra.computeWithEdgeData (starting, graph)

Full Usage: Dijkstra.computeWithEdgeData (starting, graph)

Parameters:
    starting : 'NodeKey
    graph : FGraph<'NodeKey, 'NodeData, float>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
graph : FGraph<'NodeKey, 'NodeData, float>
Returns: Dictionary<'NodeKey, float>

Dijkstra.computeWithEdgeDataBy (starting, getEdgeWeight, graph)

Full Usage: Dijkstra.computeWithEdgeDataBy (starting, getEdgeWeight, graph)

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.computeWithEdgeDataBy (starting, getEdgeWeight, graph)

Full Usage: Dijkstra.computeWithEdgeDataBy (starting, getEdgeWeight, graph)

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.ofAdjGraph starting getEdgeWeight graph

Full Usage: Dijkstra.ofAdjGraph starting getEdgeWeight graph

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.ofDiGraph source getEdgeWeight graph

Full Usage: Dijkstra.ofDiGraph source getEdgeWeight graph

Parameters:
    source : 'NodeKey - Calculate the shortest paths from this node.
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'a, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * float)[] Tuples of target node and distance.

Computes shortest paths from source for graph using Dijkstra's algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`.

source : 'NodeKey

Calculate the shortest paths from this node.

getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * float)[]

Tuples of target node and distance.

Dijkstra.ofDiGraphAllPairs getEdgeWeight graph

Full Usage: Dijkstra.ofDiGraphAllPairs getEdgeWeight graph

Parameters:
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'a, 'EdgeData> - The graph for which to compute the shortest paths.

Returns: 'NodeKey[] * float[][] The ordered array of nodes and 2D Array of distances where each row and column index corresponds to a node's index in the nodes array.

Computes all-pairs shortest paths for graph using Dijkstra algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`.

getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>

The graph for which to compute the shortest paths.

Returns: 'NodeKey[] * float[][]

The ordered array of nodes and 2D Array of distances where each row and column index corresponds to a node's index in the nodes array.

Dijkstra.ofDiGraphAllPairsWithPath getEdgeWeight graph

Full Usage: Dijkstra.ofDiGraphAllPairsWithPath getEdgeWeight graph

Parameters:
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'a, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[][] Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Computes all-pairs shortest paths for graph using Dijkstra algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`. Path only contains intermediate steps.

getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[][]

Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Dijkstra.ofDiGraphBetween getEdgeWeight graph origin destination

Full Usage: Dijkstra.ofDiGraphBetween getEdgeWeight graph origin destination

Parameters:
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData> - The graph to be analysed
    origin : 'NodeKey - The starting node of the path
    destination : 'NodeKey - The finishing node of the path

Returns: float option A float of the distance

Returns the distance in numebr of directed edges between two nodes.

getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'NodeData, 'EdgeData>

The graph to be analysed

origin : 'NodeKey

The starting node of the path

destination : 'NodeKey

The finishing node of the path

Returns: float option

A float of the distance

Dijkstra.ofDiGraphWithPath source getEdgeWeight graph

Full Usage: Dijkstra.ofDiGraphWithPath source getEdgeWeight graph

Parameters:
    source : 'NodeKey - Calculate the shortest paths from this node.
    getEdgeWeight : 'EdgeData -> float
    graph : DiGraph<'NodeKey, 'a, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[] Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Computes shortest paths from source for graph using Dijkstra's algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`. Path only contains intermediate steps.

source : 'NodeKey

Calculate the shortest paths from this node.

getEdgeWeight : 'EdgeData -> float
graph : DiGraph<'NodeKey, 'a, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[]

Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Dijkstra.ofFGraph starting getEdgeWeight graph

Full Usage: Dijkstra.ofFGraph starting getEdgeWeight graph

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, float>
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : FGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, float>

Dijkstra.ofUndirected source getEdgeWeight graph

Full Usage: Dijkstra.ofUndirected source getEdgeWeight graph

Parameters:
    source : 'NodeKey - Calculate the shortest paths from this node.
    getEdgeWeight : 'EdgeData -> float
    graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * float)[] Tuples of target node and distance.

Computes shortest paths from source for graph using Dijkstra's algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`.

source : 'NodeKey

Calculate the shortest paths from this node.

getEdgeWeight : 'EdgeData -> float
graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * float)[]

Tuples of target node and distance.

Dijkstra.ofUndirectedAllPairs getEdgeWeight graph

Full Usage: Dijkstra.ofUndirectedAllPairs getEdgeWeight graph

Parameters:
    getEdgeWeight : 'EdgeData -> float
    graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData> - The graph for which to compute the shortest paths.

Returns: 'NodeKey[] * float[][] The ordered array of nodes and 2D Array of distances where each row and column index corresponds to a node's index in the nodes array.

Computes all-pairs shortest paths for graph using Dijkstra algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`.

getEdgeWeight : 'EdgeData -> float
graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData>

The graph for which to compute the shortest paths.

Returns: 'NodeKey[] * float[][]

The ordered array of nodes and 2D Array of distances where each row and column index corresponds to a node's index in the nodes array.

Dijkstra.ofUndirectedAllPairsWithPath getEdgeWeight graph

Full Usage: Dijkstra.ofUndirectedAllPairsWithPath getEdgeWeight graph

Parameters:
    getEdgeWeight : 'EdgeData -> float
    graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[][] Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Computes all-pairs shortest paths for graph using Dijkstra algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`. Path only contains intermediate steps.

getEdgeWeight : 'EdgeData -> float
graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[][]

Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Dijkstra.ofUndirectedFGraphIncludingPath starting getEdgeWeight graph

Full Usage: Dijkstra.ofUndirectedFGraphIncludingPath starting getEdgeWeight graph

Parameters:
    starting : 'NodeKey
    getEdgeWeight : 'EdgeData -> float
    graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>

Returns: Dictionary<'NodeKey, ('NodeKey * float)>
starting : 'NodeKey
getEdgeWeight : 'EdgeData -> float
graph : AdjGraph<'NodeKey, 'NodeData, 'EdgeData>
Returns: Dictionary<'NodeKey, ('NodeKey * float)>

Dijkstra.ofUndirectedWithPath source getEdgeWeight graph

Full Usage: Dijkstra.ofUndirectedWithPath source getEdgeWeight graph

Parameters:
    source : 'NodeKey - Calculate the shortest paths from this node.
    getEdgeWeight : 'EdgeData -> float
    graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData> - The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[] Array of tuples of source NodeKey, target NodeKey, distance, and path option.

Computes shortest paths from source for graph using Dijkstra's algorithm in parallel.

If there isn't a path between two edges, the distance is set to `infinity`. Path only contains intermediate steps.

source : 'NodeKey

Calculate the shortest paths from this node.

getEdgeWeight : 'EdgeData -> float
graph : UndirectedGraph<'NodeKey, 'NodeData, 'EdgeData>

The graph for which to compute the shortest path.

Returns: ('NodeKey * 'NodeKey * float * 'NodeKey[] option)[]

Array of tuples of source NodeKey, target NodeKey, distance, and path option.