Exemple #1
0
        public StatisticalFloat Clone()
        {
            StatisticalFloat Result = new StatisticalFloat();

            Result.AddSamples(this);
            return(Result);
        }
Exemple #2
0
        public void AddDistribution(StatisticalFloat Samples)
        {
            if (MyCount == 0)
            {
                AddSamples(Samples);
            }
            else if (Samples.MyCount > 0)
            {
                MyMin          = MyMin + Samples.MyMin;
                MyMax          = MyMax + Samples.MyMax;
                MySum          = Average + Samples.Average;
                MySumOfSquares = MySum * MySum;
                MyCount        = 1;

                if (MySamples != null)
                {
                    MySamples.Clear();
                    MySamples.Add(MySum);
                }
            }
        }
Exemple #3
0
        public void AddSamples(StatisticalFloat Samples)
        {
            if (MyCount == 0)
            {
                MySum          = Samples.MySum;
                MySumOfSquares = Samples.MySumOfSquares;
                MyMin          = Samples.MyMin;
                MyMax          = Samples.MyMax;
                MyCount        = Samples.MyCount;
            }
            else
            {
                MySum          += Samples.MySum;
                MySumOfSquares += Samples.MySumOfSquares;
                MyMin           = Math.Min(MyMin, Samples.MyMin);
                MyMax           = Math.Max(MyMax, Samples.MyMax);
                MyCount        += Samples.MyCount;
            }

            if (MySamples != null)
            {
                MySamples.AddRange(Samples.MySamples);
            }
        }
Exemple #4
0
 public StatisticalFloat Clone()
 {
     StatisticalFloat Result = new StatisticalFloat();
     Result.AddSamples(this);
     return Result;
 }
Exemple #5
0
        public void AddSamples(StatisticalFloat Samples)
        {
            if (MyCount == 0)
            {
                MySum = Samples.MySum;
                MySumOfSquares = Samples.MySumOfSquares;
                MyMin = Samples.MyMin;
                MyMax = Samples.MyMax;
                MyCount = Samples.MyCount;
            }
            else
            {
                MySum += Samples.MySum;
                MySumOfSquares += Samples.MySumOfSquares;
                MyMin = Math.Min(MyMin, Samples.MyMin);
                MyMax = Math.Max(MyMax, Samples.MyMax);
                MyCount += Samples.MyCount;
            }

            if (MySamples != null)
            {
                MySamples.AddRange(Samples.MySamples);
            }
        }
Exemple #6
0
        public void AddDistribution(StatisticalFloat Samples)
        {
            if (MyCount == 0)
            {
                AddSamples(Samples);
            }
            else if (Samples.MyCount > 0)
            {
                MyMin = MyMin + Samples.MyMin;
                MyMax = MyMax + Samples.MyMax;
                MySum = Average + Samples.Average;
                MySumOfSquares = MySum * MySum;
                MyCount = 1;

                if (MySamples != null)
                {
                    MySamples.Clear();
                    MySamples.Add(MySum);
                }
            }
        }