Struct suffix_tree::Node [] [src]

pub struct Node {
    // some fields omitted
}

A node in a suffix tree.

Methods

impl Node
[src]

fn children<'t>(&'t self) -> Children<'t>

An iterator over all children of this node.

fn ancestors<'t>(&'t self) -> Ancestors<'t>

An iterator over all ancestors of this node.

This includes the current node and the root node.

fn preorder<'t>(&'t self) -> Preorder<'t>

Traverse all children nodes in preorder.

This is the same as lexicographically traversing nodes in the tree.

fn leaves<'t>(&'t self) -> Leaves<'t>

An iterator over all leaves below this node.

A node is a leaf if and only if it has terminals. It may still have children nodes. (This fact suggests this SuffixTree implementation is bunk.)

fn suffix_indices<'t>(&'t self) -> SuffixTreeIndices<'t>

An iterator over all suffix indices.

fn len(&self) -> u32

The size of the path label into this node.

fn depth(&self) -> usize

The depth of this node (number of ancestors, not including self).

fn has_terminals(&self) -> bool

Returns true if and only if this node has some terminals.

fn suffixes(&self) -> &[u32]

Returns all terminal suffix indices.

Trait Implementations

impl Debug for Node
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.