Ejemplo n.º 1
0
 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));
     }));
 }
Ejemplo n.º 2
0
 public OrderedGroupedStat(Func <TIn, TGroup> grouper, Func <IStat <TIn, TOut> > stat) : base(grouper, stat)
 {
     sortedGroups = new ConcurrentSortedSet <Tuple <TOut, TGroup> >();
 }