Ejemplo n.º 1
0
            protected override IComparable GroupTyped(ColumnTyped <DataT> sourceColumn, ArrayRange sourceIndices)
            {
                DataT result = math.Zero();
                DataT z      = math.Zero();

                foreach (var v in sourceColumn.VisitRows(sourceIndices))
                {
                    if (math.Compare(v, z) >= 0)
                    {
                        result = math.Add(result, v);
                    }
                }
                return(result);
            }
Ejemplo n.º 2
0
 protected override IComparable GroupTyped(ColumnTyped <DataT> sourceColumn, ArrayRange sourceIndices)
 {
     using (Profiling.GetMarker(Profiling.MarkerId.MergeSumPositive).Auto())
     {
         DataT result = math.Zero();
         DataT z      = math.Zero();
         foreach (var v in sourceColumn.VisitRows(sourceIndices))
         {
             if (math.Compare(v, z) >= 0)
             {
                 result = math.Add(result, v);
             }
         }
         return(result);
     }
 }