Skip to content

Commit

Permalink
🏷️ Type interface for yen_k_shortest_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwa committed Dec 3, 2024
1 parent 73bf524 commit e35e38a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ inline void yen_k_shortest_paths(pybind11::module& m)
py::class_<fiction::yen_k_shortest_paths_params>(m, "yen_k_shortest_paths_params",
DOC(fiction_yen_k_shortest_paths_params))
.def(py::init<>())
.def_readwrite("a_star_params", &fiction::yen_k_shortest_paths_params::astar_params,
.def_readwrite("astar_params", &fiction::yen_k_shortest_paths_params::astar_params,
DOC(fiction_yen_k_shortest_paths_params_astar_params))

;
Expand Down
41 changes: 39 additions & 2 deletions bindings/mnt/pyfiction/pyfiction.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ def enumerate_all_paths(
],
source: offset_coordinate,
target: offset_coordinate,
params: a_star_params
params: enumerate_all_paths_params
) -> List[List[offset_coordinate]]: ...


Expand All @@ -1485,5 +1485,42 @@ def enumerate_all_paths(
],
source: cube_coordinate,
target: cube_coordinate,
params: a_star_params
params: enumerate_all_paths_params
) -> List[List[cube_coordinate]]: ...


class yen_k_shortest_paths_params:
def __init__(self): ...

astar_params: a_star_params


@overload
def yen_k_shortest_paths(
layout: Union[
cartesian_obstruction_layout,
cartesian_gate_layout,
cartesian_layout,
shifted_cartesian_obstruction_layout,
shifted_cartesian_gate_layout,
shifted_cartesian_layout
],
source: offset_coordinate,
target: offset_coordinate,
k: int,
params: yen_k_shortest_paths_params
) -> List[List[offset_coordinate]]: ...


@overload
def yen_k_shortest_paths(
layout: Union[
hexagonal_obstruction_layout,
hexagonal_gate_layout,
hexagonal_layout
],
source: cube_coordinate,
target: cube_coordinate,
k: int,
params: yen_k_shortest_paths_params
) -> List[List[cube_coordinate]]: ...

0 comments on commit e35e38a

Please sign in to comment.