pub trait IncrementalSafetyTracker<'a, Graph: GraphBase> {
// Required methods
fn new_with_empty_subgraph(graph: &'a Graph) -> Self;
fn clear(&mut self);
fn reset(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
);
fn add_incremental_subgraph_step(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
);
fn remove_incremental_subgraph_step(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
);
fn is_safe(
&self,
is_forward_univocal: bool,
is_backward_univocal: bool
) -> bool;
fn does_safety_equal_bridge_like() -> bool;
}
Expand description
An incremental safety tracker for the incremental hydrostructure.
Required Methods§
sourcefn new_with_empty_subgraph(graph: &'a Graph) -> Self
fn new_with_empty_subgraph(graph: &'a Graph) -> Self
Creates a new instance keeping the hydrostructure components empty.
sourcefn reset(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
)
fn reset( &mut self, r_plus: &IncrementalSubgraph<'_, Graph>, r_minus: &IncrementalSubgraph<'_, Graph> )
Reset the state of the safety tracker to the current state of the hydrostructure.
sourcefn add_incremental_subgraph_step(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
)
fn add_incremental_subgraph_step( &mut self, r_plus: &IncrementalSubgraph<'_, Graph>, r_minus: &IncrementalSubgraph<'_, Graph> )
Add the nodes and edges from the current step of r_plus.
sourcefn remove_incremental_subgraph_step(
&mut self,
r_plus: &IncrementalSubgraph<'_, Graph>,
r_minus: &IncrementalSubgraph<'_, Graph>
)
fn remove_incremental_subgraph_step( &mut self, r_plus: &IncrementalSubgraph<'_, Graph>, r_minus: &IncrementalSubgraph<'_, Graph> )
Remove the nodes and edges from the current step of r_minus.
sourcefn is_safe(&self, is_forward_univocal: bool, is_backward_univocal: bool) -> bool
fn is_safe(&self, is_forward_univocal: bool, is_backward_univocal: bool) -> bool
Returns true if the safety tracker indicates that the current subwalk is safe.
sourcefn does_safety_equal_bridge_like() -> bool
fn does_safety_equal_bridge_like() -> bool
May return true if the is_safe
function returns true if and only if a subwalk is bridge-like.
It is not required to return true for all types, but for types where it does return true
the equivalence above must hold.