StreamingHamming
class StreamingHamming
@brief Hamming weight or Hamming distance, one timestamp at a time.
Weight is the running popcount of the tracked state, emitted at every timestamp. Distance is the popcount of what changed since the previous timestamp, emitted from the SECOND timestamp onward, because the first one only establishes a complete state to compare against.
Variables
| Name | Description |
|---|---|
| seen_first_ | distance mode skips the first timestamp |
| index_of_ | signal id -> slot in state_ |
| running_ | weight mode: popcount of the whole state |
Functions
| Name | Description |
|---|---|
| finish | Nothing is buffered, so this exists only to make the lifecycle explicit. |
| rows | How many rows were emitted, for the progress line the CLI prints. |
Variable Details
index_of_
std::unordered_map<uint32_t, size_t> index_of_
signal id -> slot in state_
running_
int64_t running_
weight mode: popcount of the whole state
seen_first_
bool seen_first_
distance mode skips the first timestamp
Function Details
finish
void finish()
Nothing is buffered, so this exists only to make the lifecycle explicit.
rows
size_t rows() const
How many rows were emitted, for the progress line the CLI prints.