资 源 简 介
esaxx is a C++ template library supporting to build an enhanced suffix array which is useful for various string algorithms.
For an input text of length N, esaxx builds a suffix tree in linear time using almost 20N bytes working space (alphabet size independent).
In construction, esaxx first build a suffix array, and then compute the inversed suffix array, and finally obtain the height array. By using a height array, internal nodes in a suffix tree are enumerated in post-order.
It also provides the sample program to enumerate the statistics of all substrings appeared in a text in linear time.
For a suffix array construction, I use sais.hxx, the induced sorting algorithm implemented by Yuta Mori.
How to use
Copy esa.hxx and sais.hxx to your src directory.
include "esa.hxx"
call esaxx();
Sample code
Eumerating all substrings corresponding to internal nodes.
```