(
id: number,
input: DifferenceStreamReader<T>,
output: DifferenceStreamWriter<KeyValue<number, GetValue<T>>>,
by: (value: T) => any = (value: T) => value,
)
| 20 | #values: Map<Hash, Multiplicity> // keeps track of the number of times each value has been seen |
| 21 | |
| 22 | constructor( |
| 23 | id: number, |
| 24 | input: DifferenceStreamReader<T>, |
| 25 | output: DifferenceStreamWriter<KeyValue<number, GetValue<T>>>, |
| 26 | by: (value: T) => any = (value: T) => value, |
| 27 | ) { |
| 28 | super(id, input, output) |
| 29 | this.#by = by |
| 30 | this.#values = new Map() |
| 31 | } |
| 32 | |
| 33 | run(): void { |
| 34 | const updatedValues = new Map<Hash, [Multiplicity, T]>() |
nothing calls this directly
no outgoing calls
no test coverage detected