Esempio n. 1
0
        public double AvoidingLoh()
        {
            IAvoidingLargeObjectHeapCollection <int> collection = _getEnumerable().ToAvoidingLohCollection();
            var nine   = collection.Where(x => x % 9 == 0).Select(x => (long)x).Sum();
            var maxOdd = collection.Where(x => x % 2 == 1).Select(x => (long)x).Max();

            return(nine / maxOdd);
        }
Esempio n. 2
0
        public double AvoidingLoh()
        {
            IAvoidingLargeObjectHeapCollection <int> collection = _getEnumerable().ToAvoidingLohCollection();

            var half  = collection[N / 2];
            var third = collection[N / 3];

            return(half / third);
        }