pub struct ModalGraph { /* private fields */ }Expand description
Mode-tagged routing graph.
Implementations§
Source§impl ModalGraph
impl ModalGraph
Sourcepub fn neighbours(&self, node: NodeId) -> &[ModalEdge]
pub fn neighbours(&self, node: NodeId) -> &[ModalEdge]
Neighbours of node.
Sourcepub fn from_transport_links(
space: &TransportLinkSpace,
metadata: impl IntoIterator<Item = TransportLinkMetadata>,
) -> Result<Self, ModalGraphBuildError>
pub fn from_transport_links( space: &TransportLinkSpace, metadata: impl IntoIterator<Item = TransportLinkMetadata>, ) -> Result<Self, ModalGraphBuildError>
Build a mode-tagged graph from a rustsim-traffic link space and
matching transport metadata.
Each metadata record becomes one directed ModalEdge. The edge cost
is the link’s current snapshot travel time from
TransportLinkOps::link_travel_time, so density and blocking effects
already represented in the link space are reflected in routing.
Trait Implementations§
Source§impl Clone for ModalGraph
impl Clone for ModalGraph
Source§fn clone(&self) -> ModalGraph
fn clone(&self) -> ModalGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModalGraph
impl Debug for ModalGraph
Source§impl Default for ModalGraph
impl Default for ModalGraph
Source§fn default() -> ModalGraph
fn default() -> ModalGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ModalGraph
impl RefUnwindSafe for ModalGraph
impl Send for ModalGraph
impl Sync for ModalGraph
impl Unpin for ModalGraph
impl UnsafeUnpin for ModalGraph
impl UnwindSafe for ModalGraph
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