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§

source

fn new_with_empty_subgraph(graph: &'a Graph) -> Self

Creates a new instance keeping the hydrostructure components empty.

source

fn clear(&mut self)

Remove all nodes and edges from the hydrostructure components.

source

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.

source

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.

source

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.

source

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.

source

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.

Implementors§