Esempio n. 1
0
        public static IList <int> DenseHash(IRing <int> ring)
        {
            var result = new List <int>();

            for (var i = 0; i < ring.Count; i += 16)
            {
                var range = ring.Skip(i).Take(16).ToList();
                var val   = range.Aggregate(0, (current, x) => current ^ x);

                result.Add(val);
            }

            return(result);
        }