pub struct WalkGraph {
pub vertices: Vec<Vertex>,
pub edges: Vec<Edge>,
pub turn_bans: Vec<TurnBan>,
pub adjacency: Vec<Vec<EdgeId>>,
}Fields§
§vertices: Vec<Vertex>§edges: Vec<Edge>§turn_bans: Vec<TurnBan>§adjacency: Vec<Vec<EdgeId>>Implementations§
Source§impl WalkGraph
impl WalkGraph
pub fn new(vertices: Vec<Vertex>, edges: Vec<Edge>) -> Self
pub fn rebuild_adjacency(&mut self)
pub fn validate(&self) -> Result<()>
pub fn nearest_vertex(&self, coord: Coord) -> Option<VertexId>
pub fn nearest_vertex_with_distance( &self, coord: Coord, ) -> Option<(VertexId, f64)>
pub fn snap_line_edges(&self, line: &LineString) -> Vec<EdgeId>
pub fn trace_coverage( &self, line: &LineString, max_snap_m: f64, ) -> RouteCoverage
pub fn nearest_edge(&self, coord: Coord) -> Option<EdgeId>
pub fn nearest_edge_with_distance(&self, coord: Coord) -> Option<(EdgeId, f64)>
pub fn project_onto_edge(&self, coord: Coord) -> Option<EdgeProjection>
pub fn snapped_line_start( &self, line: &LineString, edges: &[EdgeId], ) -> Option<VertexId>
pub fn walk_edges(&self, start: VertexId, edges: &[EdgeId]) -> Option<VertexId>
pub fn turn_allowed( &self, from: Option<EdgeId>, via: VertexId, to: EdgeId, ) -> bool
pub fn apply_seed_hints(&mut self, seed: &SeedRoute)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WalkGraph
impl<'de> Deserialize<'de> for WalkGraph
Source§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
impl StructuralPartialEq for WalkGraph
Auto Trait Implementations§
impl Freeze for WalkGraph
impl RefUnwindSafe for WalkGraph
impl Send for WalkGraph
impl Sync for WalkGraph
impl Unpin for WalkGraph
impl UnsafeUnpin for WalkGraph
impl UnwindSafe for WalkGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more