pub trait Traverser<Context: TraversalContext, Value> {
fn setup(
&mut self,
context: &mut Context,
traversal_contexts: &mut Vec<Context>,
seadawg: &SeaDawgCore<Value>
);
fn traverse(
&mut self,
edge_id: &u32,
edge: &SeaEdge,
context: &mut Context,
traversal_contexts: &mut Vec<Context>,
seadawg: &SeaDawgCore<Value>
);
fn collect(
&mut self,
edge_id: &u32,
edge: &SeaEdge,
context: &Context,
traversal_contexts: &mut Vec<Context>,
seadawg: &SeaDawgCore<Value>
);
fn should_accept_sink_node(
&mut self,
sink_node_id: &u32,
current_word_idx: u32,
word: &str,
seadawg: &SeaDawgCore<Value>
) -> bool;
}
Required methods
fn setup(
&mut self,
context: &mut Context,
traversal_contexts: &mut Vec<Context>,
seadawg: &SeaDawgCore<Value>
)
fn setup(
&mut self,
context: &mut Context,
traversal_contexts: &mut Vec<Context>,
seadawg: &SeaDawgCore<Value>
)
Initial selection of edges
Moves down the graph and initiates further traversals or collections
After pruning select sink edges that will be considered
fn should_accept_sink_node(
&mut self,
sink_node_id: &u32,
current_word_idx: u32,
word: &str,
seadawg: &SeaDawgCore<Value>
) -> bool
fn should_accept_sink_node(
&mut self,
sink_node_id: &u32,
current_word_idx: u32,
word: &str,
seadawg: &SeaDawgCore<Value>
) -> bool
Should sink node be added to the result set