Constructs counter with appropriate size.
Constructs counter with predefined dump.
Merges a counter into this one.
Merges a set of LPCounters into this one.
Puts integer to a counter.
Puts UUID to a counter.
Puts raw data to a counter.
auto counter = LPCounter(32); counter.put(100U); counter.put(100UL); counter.put("100"); assert(counter.count == 3); counter.put("101"); assert(counter.count == 4);
auto a = LPCounter(32); a.put(100U); a.put(100UL); a.put("100"); assert(a.count == 3); auto b = LPCounter(32); b.put(100U); // intersection b.put(200U); b.put("LP"); assert(b.count == 3); auto c = LPCounter(32); c += [a, b]; assert(c.count == 5); a += b; assert(a.count == 5);
Simple Linear Probabilistic Counter.