@@ -15,8 +15,8 @@ def dijkstra_path(
1515@_dispatchable
1616def dijkstra_path_length (
1717 G : Graph [_Node ],
18- source : str ,
19- target : str ,
18+ source : _Node ,
19+ target : _Node ,
2020 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
2121): ...
2222@_dispatchable
@@ -29,15 +29,15 @@ def single_source_dijkstra_path(
2929@_dispatchable
3030def single_source_dijkstra_path_length (
3131 G : Graph [_Node ],
32- source : str ,
32+ source : _Node ,
3333 cutoff : float | None = None ,
3434 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
3535): ...
3636@_dispatchable
3737def single_source_dijkstra (
3838 G : Graph [_Node ],
39- source : str ,
40- target : str | None = None ,
39+ source : _Node ,
40+ target : _Node | None = None ,
4141 cutoff : float | None = None ,
4242 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
4343): ...
@@ -59,14 +59,14 @@ def multi_source_dijkstra_path_length(
5959def multi_source_dijkstra (
6060 G : Graph [_Node ],
6161 sources ,
62- target : str | None = None ,
62+ target : _Node | None = None ,
6363 cutoff : float | None = None ,
6464 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
6565): ...
6666@_dispatchable
6767def dijkstra_predecessor_and_distance (
6868 G : Graph [_Node ],
69- source : str ,
69+ source : _Node ,
7070 cutoff : float | None = None ,
7171 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
7272): ...
@@ -91,8 +91,8 @@ def all_pairs_dijkstra_path(
9191@_dispatchable
9292def bellman_ford_predecessor_and_distance (
9393 G : Graph [_Node ],
94- source : str ,
95- target : str | None = None ,
94+ source : _Node ,
95+ target : _Node | None = None ,
9696 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
9797 heuristic : bool = False ,
9898): ...
@@ -106,8 +106,8 @@ def bellman_ford_path(
106106@_dispatchable
107107def bellman_ford_path_length (
108108 G : Graph [_Node ],
109- source : str ,
110- target : str ,
109+ source : _Node ,
110+ target : _Node ,
111111 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
112112): ...
113113@_dispatchable
@@ -116,13 +116,13 @@ def single_source_bellman_ford_path(
116116): ...
117117@_dispatchable
118118def single_source_bellman_ford_path_length (
119- G : Graph [_Node ], source : str , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
119+ G : Graph [_Node ], source : _Node , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
120120): ...
121121@_dispatchable
122122def single_source_bellman_ford (
123123 G : Graph [_Node ],
124- source : str ,
125- target : str | None = None ,
124+ source : _Node ,
125+ target : _Node | None = None ,
126126 weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight" ,
127127): ...
128128@_dispatchable
@@ -135,7 +135,7 @@ def all_pairs_bellman_ford_path(
135135) -> Generator [Incomplete , None , None ]: ...
136136@_dispatchable
137137def goldberg_radzik (
138- G : Graph [_Node ], source : str , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
138+ G : Graph [_Node ], source : _Node , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
139139): ...
140140@_dispatchable
141141def negative_edge_cycle (
@@ -145,7 +145,7 @@ def negative_edge_cycle(
145145): ...
146146@_dispatchable
147147def find_negative_cycle (
148- G : Graph [_Node ], source : str , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
148+ G : Graph [_Node ], source : _Node , weight : str | Callable [[Any , Any , SupportsGetItem [str , Any ]], float | None ] | None = "weight"
149149): ...
150150@_dispatchable
151151def bidirectional_dijkstra (
0 commit comments