public Report(int maxSize, Func <T, TFeature> featureSelector, IComparer <T> comparer) { this.maxSize = maxSize; this.featureSelector = featureSelector; features = new ConcurrentDictionary <T, TFeature>(); itemSet = new ConcurrentSortedSet <Tuple <TFeature, T> >(Comparer <Tuple <TFeature, T> > .Create((x, y) => { var firstComponent = x.Item1.CompareTo(y.Item1); return(firstComponent != 0 ? firstComponent : comparer.Compare(x.Item2, y.Item2)); })); }
public OrderedGroupedStat(Func <TIn, TGroup> grouper, Func <IStat <TIn, TOut> > stat) : base(grouper, stat) { sortedGroups = new ConcurrentSortedSet <Tuple <TOut, TGroup> >(); }