pub struct EdgeTraversal {
pub edge_list_id: EdgeListId,
pub edge_id: EdgeId,
pub cost: TraversalCost,
pub result_state: Vec<StateVariable>,
}Fields§
§edge_list_id: EdgeListId§edge_id: EdgeId§cost: TraversalCost§result_state: Vec<StateVariable>Implementations§
Source§impl EdgeTraversal
impl EdgeTraversal
Sourcepub fn new(
next_edge: (EdgeListId, EdgeId),
tree: &SearchTree,
prev_state: &[StateVariable],
si: &SearchInstance,
) -> Result<EdgeTraversal, SearchError>
pub fn new( next_edge: (EdgeListId, EdgeId), tree: &SearchTree, prev_state: &[StateVariable], si: &SearchInstance, ) -> Result<EdgeTraversal, SearchError>
traverses an edge, possibly after traversing some previous edge, collecting the access and traversal costs. returns the accumulated cost and updated search state.
The traversal and access models for the destination edge list are used
over the following graph trajectory:
(v1) -[e1]-> (v2) -[e2]-> (v3)
- start_state: at location (v2)
- next_edge: -[e2]->
- prev_edge: -[e1]-> (optional, is None at start of a forward search)
- access model applied from e1 to e2
- traverse model applied to e2
§Arguments
next_edge- the edge to traverseprev_edge- the previously traversed edge, if exists, for access costsprev_state- the state before traversal, positioned closer to the destinationsi- the search assets for this query
§Returns
An edge traversal summarizing the costs and result state of accessing and traversing the next edge.
Sourcepub fn new_local(
trajectory: (&Vertex, &Edge, &Vertex),
tree: &SearchTree,
prev_state: &[StateVariable],
state_model: &StateModel,
traversal_model: &dyn TraversalModel,
cost_model: &CostModel,
) -> Result<EdgeTraversal, SearchError>
pub fn new_local( trajectory: (&Vertex, &Edge, &Vertex), tree: &SearchTree, prev_state: &[StateVariable], state_model: &StateModel, traversal_model: &dyn TraversalModel, cost_model: &CostModel, ) -> Result<EdgeTraversal, SearchError>
executes a traversal from some source vertex and source state through some edge, producing the result state and cost.
this function signature makes uses lower-level constructs than the associated EdgeTraversal::new
method and does not require [Arc]-wrapped types.
Trait Implementations§
Source§impl Allocative for EdgeTraversal
impl Allocative for EdgeTraversal
Source§impl Clone for EdgeTraversal
impl Clone for EdgeTraversal
Source§fn clone(&self) -> EdgeTraversal
fn clone(&self) -> EdgeTraversal
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EdgeTraversal
impl Debug for EdgeTraversal
Source§impl<'de> Deserialize<'de> for EdgeTraversal
impl<'de> Deserialize<'de> for EdgeTraversal
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 Display for EdgeTraversal
impl Display for EdgeTraversal
Auto Trait Implementations§
impl Freeze for EdgeTraversal
impl RefUnwindSafe for EdgeTraversal
impl Send for EdgeTraversal
impl Sync for EdgeTraversal
impl Unpin for EdgeTraversal
impl UnwindSafe for EdgeTraversal
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