pub struct RouterNGBuilder {
pub(crate) bounds: Bounds,
pub(crate) blocks: Vec<Block>,
pub(crate) channels: Vec<Channel>,
pub(crate) seed_points: Vec<Point>,
}Fields§
§bounds: BoundsWhat the lattice covers.
blocks: Vec<Block>The blocking rectangles
channels: Vec<Channel>The routing channels
seed_points: Vec<Point>Points at which Self::build_closed seeds a full (H+V) channel — route
endpoints and waypoints. Ignored by the test-only build.
Implementations§
Source§impl RouterNGBuilder
impl RouterNGBuilder
Sourcepub fn within(self, bounds: Bounds) -> Self
pub fn within(self, bounds: Bounds) -> Self
Cover only bounds. The default is Bounds::UNBOUNDED.
pub fn add_h_channel(&mut self, seed: impl Into<Point>, cost: impl Into<Cost>)
Sourcepub fn add_seed_point(&mut self, p: impl Into<Point>)
pub fn add_seed_point(&mut self, p: impl Into<Point>)
Register a point (a route endpoint or waypoint) at which build_closed
seeds a full channel, so the closed graph already contains the nodes every
route needs — no geometry is added once the graph is closed.
pub fn add_v_channel(&mut self, seed: impl Into<Point>, cost: impl Into<Cost>)
pub(crate) fn add_routing_moat( &mut self, top_left: Point, bottom_right: Point, distance: i32, cost: Cost, )
pub fn add_block( &mut self, top_left: impl Into<Point>, bottom_right: impl Into<Point>, )
Sourcepub(crate) fn seed_channels_into_router(&self) -> RouterNG
pub(crate) fn seed_channels_into_router(&self) -> RouterNG
Construct a dirty router with all channels seeded but not yet built into a
graph. Shared by Self::build_closed and the test-only build.
Sourcepub fn build_closed(self) -> ClosedRouter
pub fn build_closed(self) -> ClosedRouter
Build a ClosedRouter: seed all channels AND the endpoint/waypoint
channels registered via Self::add_seed_point, build the graph once,
then freeze the geometry. Routing on the result only mutates edge weights.
Trait Implementations§
Source§impl Clone for RouterNGBuilder
impl Clone for RouterNGBuilder
Source§fn clone(&self) -> RouterNGBuilder
fn clone(&self) -> RouterNGBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more