示例#1
0
 public ExistenceStatCollector(string memberName, Configuration configuration, out bool cancel)
 {
     MemberName     = memberName;
     _byteConverter = ByteConverterHelpers.GetByteConverter <T>();
     _murmurHash    = MurmurHash.Create128(managed: true, preference: AlgorithmPreference.X64);
     cancel         = false;
 }
示例#2
0
        public DistinctStatCollector(string memberName, Configuration configuration, out bool cancel)
        {
            MemberName = memberName;

            /*if (typeof(T) == typeof(string) ||
             *  typeof(T) == typeof(int) ||
             *  typeof(T) == typeof(uint) ||
             *  typeof(T) == typeof(long) ||
             *  typeof(T) == typeof(ulong) ||
             *  typeof(T) == typeof(float) ||
             *  typeof(T) == typeof(double) ||
             *  typeof(T) == typeof(byte[]))
             * {
             *  _estimator = (ICardinalityEstimator<T>)new CardinalityEstimator();
             * }
             * else*/
            {
                _byteConverter = ByteConverterHelpers.GetByteConverter <T>();
                //_estimator = new CardinalityEstimator(14, CardinalityEstimation.Hash.HashFunctionId.Fnv1A);
                _estimator = new CardinalityEstimator(14, CardinalityEstimation.Hash.HashFunctionId.Murmur3);
            }

            cancel = false;
        }