SDSL 3.0.3
Succinct Data Structure Library
Loading...
Searching...
No Matches
sdsl::algorithm Namespace Reference

Functions

template<typename t_int_vec>
void calculate_sa (unsigned char const *c, typename t_int_vec::size_type len, t_int_vec &sa)
 Calculates the Suffix Array for a text.
 

Function Documentation

◆ calculate_sa()

template<typename t_int_vec>
void sdsl::algorithm::calculate_sa ( unsigned char const * c,
typename t_int_vec::size_type len,
t_int_vec & sa )

Calculates the Suffix Array for a text.

Parameters
cText (c-string) to calculate the suffix array. The lex. order is given by the ascii-codes of the characters.
lenLength of the text. *(c+len)=0 and for i<len *(c+len)!=0
saReference to a RandomAccessContainer which will contain the result of the calculation.
Precondition
sa.size() has to be equal to len.

Definition at line 91 of file construct_sa.hpp.