pub enum SearchAlgorithm {
SingleSourceShortestPath {
termination_behavior: TerminationFailurePolicy,
a_star: bool,
},
KspSingleVia {
k: usize,
underlying: Box<SearchAlgorithm>,
similarity: Option<RouteSimilarityFunction>,
termination: Option<KspTerminationCriteria>,
},
Yens {
k: usize,
underlying: Box<SearchAlgorithm>,
similarity: Option<RouteSimilarityFunction>,
termination: Option<KspTerminationCriteria>,
},
}Variants§
SingleSourceShortestPath
algorithm to support classic SSSP algorithms such as Dijkstra’s and A*.
Fields
§
termination_behavior: TerminationFailurePolicyif the termination model returns early, treat it as a search error. if false, the result is still returned. this option is not valid for searches without destinations (path searches).
KspSingleVia
KSP using the single via paths algorithm.
Fields
§
underlying: Box<SearchAlgorithm>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
KSP using Yen’s Algorithm
Fields
§
underlying: Box<SearchAlgorithm>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
Implementations§
Source§impl SearchAlgorithm
impl SearchAlgorithm
pub fn run_vertex_oriented( &self, src_id: VertexId, dst_id_opt: Option<VertexId>, query: &Value, direction: &Direction, si: &SearchInstance, ) -> Result<SearchAlgorithmResult, SearchError>
pub fn run_edge_oriented( &self, src: (EdgeListId, EdgeId), dst_opt: Option<(EdgeListId, EdgeId)>, query: &Value, direction: &Direction, si: &SearchInstance, ) -> Result<SearchAlgorithmResult, SearchError>
Trait Implementations§
Source§impl Clone for SearchAlgorithm
impl Clone for SearchAlgorithm
Source§fn clone(&self) -> SearchAlgorithm
fn clone(&self) -> SearchAlgorithm
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 SearchAlgorithm
impl Debug for SearchAlgorithm
Source§impl From<&SearchAlgorithmConfig> for SearchAlgorithm
impl From<&SearchAlgorithmConfig> for SearchAlgorithm
Source§fn from(value: &SearchAlgorithmConfig) -> Self
fn from(value: &SearchAlgorithmConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SearchAlgorithm
impl RefUnwindSafe for SearchAlgorithm
impl Send for SearchAlgorithm
impl Sync for SearchAlgorithm
impl Unpin for SearchAlgorithm
impl UnwindSafe for SearchAlgorithm
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
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>
Converts
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>
Converts
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