public void HllNormalCountDifferentValuesTest()
        {
            IList<ulong> testedValues = new List<ulong> { 10, 200, 10000, 30000, 100000 };

            foreach (ulong value in testedValues)
            {
                hll = new HyperLogLogNormal(14);
                for (ulong i = 0; i < value; ++i)
                    hll.Add(i);
                TestsHelper.AssertRelativeError(value, hll.Cardinality);
            }
        }
 public void InitTests()
 {
     hll = new HyperLogLogNormal(14);
 }
 public abstract bool Merge(HyperLogLog hll);
        public override bool Merge(HyperLogLog hll)
        {
            if (hll == null)
                throw new ArgumentException("Parameter hyperloglog cannot be null");

            if (!(hll is HyperLogLogNormal))
                throw new ArgumentException("Parameter hyperloglog instance must be 'normal' too");

            HyperLogLogNormal hllN = hll as HyperLogLogNormal;
            if (Precision != hllN.Precision)
                throw new ArgumentException("Both hyperloglog instances must have the same precision");

            bool smthingHasBeenModified = Merge(hllN);
            return smthingHasBeenModified;
        }
 public void TestsInit()
 {
     hll1 = new HyperLogLogPlusPlus(PRECISION_DEFAULT, SPARSE_PRECISION_DEFAULT);
 }
 public void TestsInit()
 {
     hll = new HyperLogLogPlusPlus(14, 18);
 }
        public override bool Merge(HyperLogLog hll)
        {
            if (hll == null)
                throw new ArgumentException("Parameter hyperloglog cannot be null");

            if (!(hll is HyperLogLogPlusPlus))
                throw new ArgumentException("Parameter hyperloglog instance must be 'normal' too");

            HyperLogLogPlusPlus hllPP = hll as HyperLogLogPlusPlus;

            if (IsInSparseRepresentation != hllPP.IsInSparseRepresentation)
                throw new ArgumentException("Both hyperloglog instances must have the same representation.");
            if (Precision != hllPP.Precision)
                throw new ArgumentException("Both hyperloglog instances must have the same precision");
            if (IsInSparseRepresentation && SparsePrecision != hllPP.SparsePrecision)
                throw new ArgumentException("Both hyperloglog instances must have the same sparse precision");

            bool smthingHasBeenModified = Merge(hllPP);
            return smthingHasBeenModified;
        }