13 : m_data(
std::accumulate(idict.begin(), idict.end(), 0, [](
int a,
std::
string b) {
return a +
b.size(); })),
14 m_index(idict.size(), 1) {
17 std::partial_sum(m_index.begin(), m_index.end(), m_index.begin());
18 std::sort(m_index.begin(), m_index.end(), [&idict](
unsigned int a,
unsigned int b) {
19 return std::less<std::string>()(idict[
a], idict[
b]);
23 std::vector<char>::iterator
p = m_data.begin();
24 for (
size_t j = 0;
j < m_index.size();
j++) {
25 size_t i = m_index[
j];
27 m_index[
j] =
p - m_data.begin();
33 return std::lexicographical_compare(rh.
b, rh.
b + rh.
l,
lh.b,
lh.b +
lh.l);
const_iterator end() const
std::vector< unsigned int > m_index
bool operator()(SmallWORMDict::Frame const &rh, SmallWORMDict::Frame const &lh) const
const_iterator begin() const
const_iterator find(std::string const &s) const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
size_t index(std::string const &s) const