public CountMinSketchAggState(CountMinSketchState state, CountMinSketchAgent agent) { _state = state; _agent = agent; _add = new CountMinSketchAgentContextAdd(state); _estimate = new CountMinSketchAgentContextEstimate(state); _fromBytes = new CountMinSketchAgentContextFromBytes(state); }
public void Add(CountMinSketchAgentContextAdd ctx) { if (ctx.Value == null) { return; } var value = (byte[]) ctx.Value; ctx.State.Add(value, 1); }
public CountMinSketchAggState( CountMinSketchState state, CountMinSketchAgent agent) { this.state = state; this.agent = agent; add = new CountMinSketchAgentContextAdd(state); estimate = new CountMinSketchAgentContextEstimate(state); fromBytes = new CountMinSketchAgentContextFromBytes(state); }