Enum adivon::suffix_tree::Node
[−]
[src]
pub enum Node<'a, T: 'a> { Internal { data: &'a [T], offsets: VecMap<usize>, terminates: VecMap<usize>, children: BTreeMap<T, Node<'a, T>>, suffix_link: Rawlink<Node<'a, T>>, }, Root { children: BTreeMap<T, Node<'a, T>>, }, }
A node in SuffixTree
Variants
Internal
Fields of Internal
data: &'a [T] | the edge label |
offsets: VecMap<usize> | { text index in root: start position of offset} |
terminates: VecMap<usize> | text terminates at this node, suffix offset: { text index in root: suffix offset} |
children: BTreeMap<T, Node<'a, T>> | |
suffix_link: Rawlink<Node<'a, T>> |
Root
Fields of Root
children: BTreeMap<T, Node<'a, T>> |
Methods
impl<'a, T: Ord + Copy + Debug> Node<'a, T>
[src]
fn root() -> Node<'a, T>
fn leaf(
data: &'a [T],
txt_idx: usize,
start_pos: usize,
rank: usize
) -> Node<'a, T>
data: &'a [T],
txt_idx: usize,
start_pos: usize,
rank: usize
) -> Node<'a, T>
fn add_child(&mut self, x: Node<'a, T>)
fn split_at(&mut self, txt_idx: usize, offset: usize)
fn add_terminate(&mut self, txt_idx: usize, position: usize)
fn terminates_any(&self) -> bool
fn data(&self) -> &'a [T]
fn head(&self) -> T
fn iter_children<'t>(&'t self) -> Values<'t, T, Node<'a, T>>
fn is_root(&self) -> bool
fn is_internal(&self) -> bool
fn clean_suffix_links(&mut self)
fn mut_child_starts_with<'t>(&'t mut self, c: &T) -> Option<&'t mut Node<'a, T>>
fn child_starts_with(&self, c: &T) -> Option<&Node<'a, T>>
Trait Implementations
impl<'a, T: Debug + 'a> Debug for Node<'a, T>
[src]
impl<'a, T: Clone + 'a> Clone for Node<'a, T>
[src]
fn clone(&self) -> Node<'a, T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more