Definition at line 245 of file regexp.cc.
◆ FrequencyCollator()
dart::FrequencyCollator::FrequencyCollator |
( |
| ) |
|
|
inline |
Definition at line 247 of file regexp.cc.
247 : total_samples_(0) {
249 frequencies_[
i] = CharacterFrequency(
i);
250 }
251 }
static constexpr intptr_t kTableSize
◆ CountCharacter()
void dart::FrequencyCollator::CountCharacter |
( |
intptr_t |
character | ) |
|
|
inline |
Definition at line 253 of file regexp.cc.
253 {
255 frequencies_[index].Increment();
256 total_samples_++;
257 }
static constexpr intptr_t kTableMask
◆ Frequency()
intptr_t dart::FrequencyCollator::Frequency |
( |
intptr_t |
in_character | ) |
|
|
inline |
Definition at line 261 of file regexp.cc.
261 {
263 if (total_samples_ < 1) return 1;
264 intptr_t freq_in_per128 =
265 (frequencies_[in_character].counter() * 128) / total_samples_;
266 return freq_in_per128;
267 }
The documentation for this class was generated from the following file:
- third_party/dart-lang/sdk/runtime/vm/regexp.cc