ixfx
Preparing search index...
Collections
Graphs
Directed
pathDijkstra
Function pathDijkstra
pathDijkstra
(
graph
:
Readonly
,
sourceOrId
:
|
string
|
Readonly
<
{
id
:
string
;
out
:
readonly
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
}
,
>
,
)
:
{
distances
:
Map
<
string
,
number
>
;
pathTo
:
(
id
:
string
)
=>
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
previous
:
Map
<
string
,
|
null
|
Readonly
<
{
id
:
string
;
out
:
readonly
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
}
,
>
,
>
;
}
Compute shortest distance from the source vertex to the rest of the graph.
Parameters
graph
:
Readonly
sourceOrId
:
|
string
|
Readonly
<
{
id
:
string
;
out
:
readonly
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
}
,
>
Returns
{
distances
:
Map
<
string
,
number
>
;
pathTo
:
(
id
:
string
)
=>
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
previous
:
Map
<
string
,
|
null
|
Readonly
<
{
id
:
string
;
out
:
readonly
Readonly
<
{
id
:
string
;
weight
?:
number
}
>
[]
;
}
,
>
,
>
;
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
ixfx
Loading...
Compute shortest distance from the source vertex to the rest of the graph.