pub trait TransitNetworkModifier<R, T: CoordNum> {
    // Required methods
    fn add_node(&mut self, node: TransitNode<R>) -> NodeId;
    fn add_edge(&mut self, edge: TransitEdge<T>);
    fn add_edge_with_accessibility(
        &mut self,
        edge: TransitEdge<T>,
        accessibility: Accessability
    );
}
Expand description

Trait providing methods for modifying a transit network.

This trait provides an abstraction for modifying a transit network, which is represented as a graph with TransitNode instances as nodes and TransitEdge instances as edges.

Required Methods§

source

fn add_node(&mut self, node: TransitNode<R>) -> NodeId

Adds a TransitNode to the network.

Arguments
  • node - The TransitNode to be added to the network.
Returns
  • NodeId - The ID of the added node.
source

fn add_edge(&mut self, edge: TransitEdge<T>)

Adds a TransitEdge to the network.

Arguments
  • edge - The TransitEdge to be added to the network.
source

fn add_edge_with_accessibility( &mut self, edge: TransitEdge<T>, accessibility: Accessability )

Adds a TransitEdge to the network with a given accessibility.

Arguments
  • edge - The TransitEdge to be added to the network.
  • accessibility - The Accessability of the edge.

Implementors§

source§

impl<R: Copy, T: CoordNum> TransitNetworkModifier<R, T> for TransitNetwork<R, T>

Implementation of TransitNetworkModifier trait for TransitNetwork.

This implementation delegates the operations to the underlying physical graph.