Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
suffix_tree_example.cc File Reference

Illustrative example for the naive compressed suffix tree. More...

#include <iostream>
#include <string>
#include <Suffix_Structures.H>
Include dependency graph for suffix_tree_example.cc:

Go to the source code of this file.

Functions

int main ()
 Example program demonstrating construction and queries on a Naive_Suffix_Tree for the string "banana".
 

Detailed Description

Illustrative example for the naive compressed suffix tree.

Definition in file suffix_tree_example.cc.

Function Documentation

◆ main()

int main ( )

Example program demonstrating construction and queries on a Naive_Suffix_Tree for the string "banana".

Constructs a Naive_Suffix_Tree from "banana", prints the input text and node count, checks whether the pattern "ana" is contained in the text, and prints all match starting positions to standard output.

Returns
0 on successful execution.

Definition at line 52 of file suffix_tree_example.cc.

References Aleph::divide_and_conquer_partition_dp(), Aleph::Naive_Suffix_Tree::find_all(), and Aleph::Naive_Suffix_Tree::node_count().