1- from _typeshed import Incomplete
2- from collections .abc import Callable
1+ from _typeshed import Incomplete , SupportsLenAndGetItem
2+ from collections .abc import Callable , Mapping
3+ from typing import Any , TypeVar
34
45from networkx .classes .digraph import DiGraph
56from networkx .classes .graph import Graph , _Node
@@ -15,6 +16,10 @@ __all__ = [
1516 "threshold_accepting_tsp" ,
1617]
1718
19+ _SupportsLenAndGetItemT = TypeVar ("_SupportsLenAndGetItemT" , bound = SupportsLenAndGetItem [Any ])
20+
21+ def swap_two_nodes (soln : _SupportsLenAndGetItemT , seed ) -> _SupportsLenAndGetItemT : ...
22+ def move_one_node (soln : _SupportsLenAndGetItemT , seed ) -> _SupportsLenAndGetItemT : ...
1823@_dispatchable
1924def christofides (G : Graph [_Node ], weight : str | None = "weight" , tree : Graph [_Node ] | None = None ): ...
2025@_dispatchable
@@ -31,6 +36,10 @@ def asadpour_atsp(
3136 G : DiGraph [_Node ], weight : str | None = "weight" , seed : int | RandomState | None = None , source : str | None = None
3237): ...
3338@_dispatchable
39+ def held_karp_ascent (G : Graph [_Node ], weight = "weight" ): ...
40+ @_dispatchable
41+ def spanning_tree_distribution (G : Graph [_Node ], z : Mapping [Incomplete , Incomplete ]) -> dict [Incomplete , Incomplete ]: ...
42+ @_dispatchable
3443def greedy_tsp (G : Graph [_Node ], weight : str | None = "weight" , source = None ): ...
3544@_dispatchable
3645def simulated_annealing_tsp (
0 commit comments