/// <summary> /// Add an item to the estimator. /// </summary> /// <param name="item">The entity to add</param> /// <remarks>based upon the strata, the value is either added to an IBF or to the b-bit minwise estimator.</remarks> public void Add(TEntity item) { var idHash = _configuration.IdHash(_configuration.GetId(item)); var entityHash = _configuration.EntityHash(item); if (!_strataEstimator.ConditionalAdd(idHash, entityHash)) { if (_minwiseEstimator == null) { _minwiseReplacementCount++; } else { _minwiseEstimator.Add(new KeyValuePair <int, int>(idHash, entityHash)); } } }