Beispiel #1
0
        /// <summary>
        /// Aggregate a set of generic data statistics into this set.
        /// </summary>
        /// <param name="other"></param>
        protected virtual void AggregateBaseDataWith(DataStatisticsAggregator other)
        {
            CellSize = other.CellSize;

            // Details...
            if (Counts != null && other.Counts != null)
            {
                Counts = Counts ?? new long[other.Counts.Length];

                Debug.Assert(Counts.Length == other.Counts.Length);

                for (int i = 0; i < Counts.Length; i++)
                {
                    Counts[i] += other.Counts[i];
                }
            }

            // Summary...
            SummaryCellsScanned += other.SummaryCellsScanned;

            CellsScannedAtTarget    += other.CellsScannedAtTarget;
            CellsScannedOverTarget  += other.CellsScannedOverTarget;
            CellsScannedUnderTarget += other.CellsScannedUnderTarget;

            if (other.SummaryCellsScanned > 0)
            {
                IsTargetValueConstant &= other.IsTargetValueConstant;
                MissingTargetValue    |= other.MissingTargetValue;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Combine this aggregator with another aggregator and store the result in this aggregator
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public DataStatisticsAggregator AggregateWith(DataStatisticsAggregator other)
        {
            AggregateBaseDataWith(other);

            DataCheck(other);

            return(this);
        }
Beispiel #3
0
 protected virtual void DataCheck(DataStatisticsAggregator other)
 {
     // Nothing to implement...
 }