MajorityCounter<T> class
Constructors
-
MajorityCounter({required Normalizer<
T> normalize})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isEmpty → bool
-
no setter
-
normalize
→ Normalizer<
T> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
T value, {int weight = 1}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
snapshot(
) → Map< T, int> -
top(
) → (T, int)? - Returns (value, count). Deterministic tie-break by lexicographic toString.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited