Module transit_grid::algorithms
source · Expand description
TransitNet is a Rust library for representing, manipulating, and performing computations on transit networks. It provides a set of core data structures and algorithms that are commonly used in transit network analysis.
The library is organized into several modules:
-
algorithms
- This module provides a collection of algorithms for performing various computations on transit networks, such as finding the shortest path, calculating the centrality of a node, etc. -
core
- This module defines the core data structures used throughout the library, including various types of nodes, edges, and graphs. -
graphs
- This module defines several types of graphs that can represent a transit network at different levels of detail, including the physical graph, the topological graph, and the transit network. -
operations
- This module provides operations for manipulating transit networks, such as adding or removing nodes or edges, merging networks, etc.
The prelude
module re-exports the most commonly used items from the core
, graphs
, and operations
modules,
providing a convenient way to import many items at once.
The top level of the library also includes some general attributes and macros,
as well as an inclusion of the README file as module documentation.
Module providing traits and implementations for shortest path computations
on a transit network. The two main traits defined are ShortestPath
and ShortestPathWithAccessability
.
ShortestPath
trait is used for computing shortest path between two nodes in a network.
ShortestPathWithAccessability
extends ShortestPath
and takes into account the accessibility
of nodes while computing the shortest path. This is useful in scenarios where certain nodes
in the network may not be accessible and need to be avoided.
The module also provides implementations of these traits for TransitNetwork
struct.
It uses A* algorithm from petgraph
crate for shortest path computation.
Modules
- Edge length functions for
TransitEdge
.
Traits
ShortestPath
trait provides functionality to compute shortest path in a network.- This trait provides methods for finding the shortest path between two nodes in a graph with consideration for the accessibility of nodes.