Struct map_model::pathfind::pathfinder::Pathfinder [−][src]
pub struct Pathfinder { car_graph: VehiclePathfinder, bike_graph: VehiclePathfinder, bus_graph: VehiclePathfinder, train_graph: VehiclePathfinder, walking_graph: SidewalkPathfinder, walking_with_transit_graph: SidewalkPathfinder, params: RoutingParams, cached_alternatives: ThreadLocal<RefCell<VecMap<(PathConstraints, RoutingParams), Pathfinder>>>, }
Fields
car_graph: VehiclePathfinder
bike_graph: VehiclePathfinder
bus_graph: VehiclePathfinder
train_graph: VehiclePathfinder
walking_graph: SidewalkPathfinder
walking_with_transit_graph: SidewalkPathfinder
params: RoutingParams
cached_alternatives: ThreadLocal<RefCell<VecMap<(PathConstraints, RoutingParams), Pathfinder>>>
Implementations
Quickly create an invalid pathfinder, just to make borrow checking / initialization order work.
pub fn new(
map: &Map,
params: RoutingParams,
engine: CreateEngine<'_>,
timer: &mut Timer<'_>
) -> Pathfinder
pub fn new_limited(
map: &Map,
params: RoutingParams,
engine: CreateEngine<'_>,
modes: Vec<PathConstraints>,
timer: &mut Timer<'_>
) -> Pathfinder
pub fn new_limited(
map: &Map,
params: RoutingParams,
engine: CreateEngine<'_>,
modes: Vec<PathConstraints>,
timer: &mut Timer<'_>
) -> Pathfinder
Create a new Pathfinder with custom routing params that can only serve some modes.
Finds a path from a start to an end for a certain type of agent.
pub fn pathfind_with_params(
&self,
req: PathRequest,
params: &RoutingParams,
cache_custom: bool,
map: &Map
) -> Option<PathV2>
pub fn pathfind_with_params(
&self,
req: PathRequest,
params: &RoutingParams,
cache_custom: bool,
map: &Map
) -> Option<PathV2>
Finds a path from a start to an end for a certain type of agent. May use custom routing parameters. If caching is requested and custom routing parameters are used, then the intermediate graph is saved to speed up future calls with the same routing parameters.
pub fn all_costs_from(
&self,
req: PathRequest,
map: &Map
) -> Option<(Duration, HashMap<DirectedRoadID, Duration>)>
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Pathfinder
impl Send for Pathfinder
impl Sync for Pathfinder
impl Unpin for Pathfinder
impl UnwindSafe for Pathfinder
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self