Welcome to mirror list, hosted at ThFree Co, Russian Federation.

suffix_array.hpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 41cf35196a141e89247aa5351251716edc439444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <cstdint>
#include <string>
#include <vector>

namespace base
{
// Builds suffix array for the string |s| and stores result in the
// |sa| array. Size of |sa| must be not less than |n|.
//
// Time complexity: O(n)
void Skew(size_t n, uint8_t const * s, size_t * sa);
void Skew(std::string const & s, std::vector<size_t> & sa);
}  // namespace base