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

count_records.cc « stream « util - github.com/kpu/kenlm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bdadad713a546f222b419d59d114e45035af7e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "util/stream/count_records.hh"
#include "util/stream/chain.hh"

namespace util { namespace stream {

void CountRecords::Run(const ChainPosition &position) {
  for (Link link(position); link; ++link) {
    *count_ += link->ValidSize() / position.GetChain().EntrySize();
  }
}

}} // namespaces