mirror of https://codeberg.org/topola/topola.git
refactor(router/astar): Rename `Astar<...>` to `AstarStepper<...>`
Since it is a stepper, and we append -`Stepper` to identifiers denoting types that are steppers.
This commit is contained in:
parent
0df68ee80c
commit
7dc275969c
|
|
@ -117,7 +117,7 @@ pub trait MakeEdgeRef: IntoEdgeReferences {
|
|||
fn edge_ref(&self, edge_id: Self::EdgeId) -> Self::EdgeRef;
|
||||
}
|
||||
|
||||
pub struct Astar<G, K>
|
||||
pub struct AstarStepper<G, K>
|
||||
where
|
||||
G: GraphBase,
|
||||
G::NodeId: Eq + Ord,
|
||||
|
|
@ -149,7 +149,7 @@ pub enum AstarError {
|
|||
NotFound,
|
||||
}
|
||||
|
||||
impl<G, K> Astar<G, K>
|
||||
impl<G, K> AstarStepper<G, K>
|
||||
where
|
||||
G: GraphBase,
|
||||
G::NodeId: Eq + Ord,
|
||||
|
|
@ -177,7 +177,7 @@ where
|
|||
}
|
||||
|
||||
impl<G, K, R, S: AstarStrategy<G, K, R>> Step<S, (K, Vec<G::NodeId>, R), AstarContinueStatus>
|
||||
for Astar<G, K>
|
||||
for AstarStepper<G, K>
|
||||
where
|
||||
G: GraphBase,
|
||||
G::NodeId: Eq + Ord,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ use crate::{
|
|||
geometry::primitive::PrimitiveShape,
|
||||
layout::LayoutEdit,
|
||||
router::{
|
||||
astar::{Astar, AstarError},
|
||||
astar::{AstarError, AstarStepper},
|
||||
navcord::Navcord,
|
||||
navcorder::Navcorder,
|
||||
navmesh::{Navmesh, NavmeshError},
|
||||
|
|
@ -25,7 +25,7 @@ use crate::{
|
|||
#[derive(Getters, Dissolve)]
|
||||
pub struct RouteStepper {
|
||||
#[getter(skip)]
|
||||
astar: Astar<Navmesh, f64>,
|
||||
astar: AstarStepper<Navmesh, f64>,
|
||||
navcord: Navcord,
|
||||
ghosts: Vec<PrimitiveShape>,
|
||||
obstacles: Vec<PrimitiveIndex>,
|
||||
|
|
@ -57,7 +57,7 @@ impl RouteStepper {
|
|||
let mut navcord = layout.start(recorder, source, source_navvertex, width);
|
||||
|
||||
let mut strategy = RouterAstarStrategy::new(layout, &mut navcord, target);
|
||||
let astar = Astar::new(navmesh, source_navvertex, &mut strategy);
|
||||
let astar = AstarStepper::new(navmesh, source_navvertex, &mut strategy);
|
||||
let ghosts = vec![];
|
||||
let obstacles = vec![];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue