pub enum SearchAlgorithmConfig {
Dijkstras {
termination_behavior: Option<TerminationFailurePolicy>,
},
AStar {
termination_behavior: Option<TerminationFailurePolicy>,
},
KspSingleVia {
k: usize,
underlying: Box<SearchAlgorithmConfig>,
similarity: Option<RouteSimilarityFunction>,
termination: Option<KspTerminationCriteria>,
},
Yens {
k: usize,
underlying: Box<SearchAlgorithmConfig>,
similarity: Option<RouteSimilarityFunction>,
termination: Option<KspTerminationCriteria>,
},
}Variants§
Dijkstras
Edgard Dijkstra’s breadth first search algorithm, implemented as A* with a zero-valued cost estimate function.
Fields
termination_behavior: Option<TerminationFailurePolicy>optional argument to define handling of terminated searches
AStar
Classic best-first search algorithm.
Fields
termination_behavior: Option<TerminationFailurePolicy>optional argument to define handling of terminated searches
KspSingleVia
K-shortest paths algorithm that relies on a novel bidirectional search algorithm combined with a map-algebraic heuristic to identify midpoints on approximate ksp paths. Taken from the paper Häcker, Christian, et al. “Most diverse near-shortest paths.” Proceedings of the 29th International Conference on Advances in Geographic Information Systems. 2021.
Fields
underlying: Box<SearchAlgorithmConfig>path search algorithm to use
similarity: Option<RouteSimilarityFunction>if provided, filters out potential solution paths based on their similarity to the paths in the stored result set
termination: Option<KspTerminationCriteria>termination criteria for the inner path search function
Yens
K-shortest paths algorithm that relies on successive edge cuts to find alternatives to the true shortest path. Taken from the paper Yen, Jin Y. “An algorithm for finding shortest routes from all source nodes to a given destination in general networks.” Quarterly of applied mathematics 27.4 (1970): 526-530.
Fields
underlying: Box<SearchAlgorithmConfig>path search algorithm to use
similarity: Option<RouteSimilarityFunction>if provided, filters out potential solution paths based on their similarity to the paths in the stored result set
termination: Option<KspTerminationCriteria>termination criteria for the inner path search function
Trait Implementations§
Source§impl Clone for SearchAlgorithmConfig
impl Clone for SearchAlgorithmConfig
Source§fn clone(&self) -> SearchAlgorithmConfig
fn clone(&self) -> SearchAlgorithmConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SearchAlgorithmConfig
impl Debug for SearchAlgorithmConfig
Source§impl<'de> Deserialize<'de> for SearchAlgorithmConfig
impl<'de> Deserialize<'de> for SearchAlgorithmConfig
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>,
Source§impl From<&SearchAlgorithmConfig> for SearchAlgorithm
impl From<&SearchAlgorithmConfig> for SearchAlgorithm
Source§fn from(value: &SearchAlgorithmConfig) -> Self
fn from(value: &SearchAlgorithmConfig) -> Self
Auto Trait Implementations§
impl Freeze for SearchAlgorithmConfig
impl RefUnwindSafe for SearchAlgorithmConfig
impl Send for SearchAlgorithmConfig
impl Sync for SearchAlgorithmConfig
impl Unpin for SearchAlgorithmConfig
impl UnsafeUnpin for SearchAlgorithmConfig
impl UnwindSafe for SearchAlgorithmConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more