setValue method

void setValue(
  1. int value
)

Add an occurrence of a value

Implementation

void setValue(int value) {
  int confidence = _values[value] ?? 0;
  _values[value] = ++confidence;
}