Пример #1
0
 public void Add(Distribution newEntry)
 {
     P10.Add(newEntry.P10);
     P25.Add(newEntry.P25);
     P50.Add(newEntry.P50);
     P75.Add(newEntry.P75);
 }
Пример #2
0
        public Distribution GetMedians()
        {
            Distribution distOut = new Distribution();

            distOut.P10 = P10.ToList().Percentile(50);
            distOut.P25 = P25.ToList().Percentile(50);
            distOut.P50 = P50.ToList().Percentile(50);
            distOut.P75 = P75.ToList().Percentile(50);

            return(distOut);
        }
Пример #3
0
        public Distribution GetMedians()
        {
            Distribution distOut = new Distribution();

            P10.Sort();
            P25.Sort();
            P50.Sort();
            P75.Sort();

            double[] p10out = P10.ToArray();
            double[] p25out = P25.ToArray();
            double[] p50out = P50.ToArray();
            double[] p75out = P75.ToArray();

            distOut.P10 = p10out.Percentile(50);
            distOut.P25 = p25out.Percentile(50);
            distOut.P50 = p50out.Percentile(50);
            distOut.P75 = p75out.Percentile(50);

            return(distOut);
        }
Пример #4
0
        public void TestMethod1()
        {
            var t = new P50();

            Assert.AreEqual(t.MyPow(2, 10), Math.Pow(2, 10));
        }
 public string ToTimeStr(TimeUnit unit = null, bool showLevel = true) => $"[.95: {P95.ToTimeStr(unit)}] (0: {P0.ToTimeStr(unit)}]; .5: {P50.ToTimeStr(unit)}; 1: {P100.ToTimeStr(unit)})";
 public string ToStr(bool showLevel    = true) => $"[.95: {P95.ToStr()}] (0: {P0.ToStr()}]; .5: {P50.ToStr()}; 1: {P100.ToStr()})";
Пример #7
0
 public string ToTimeStr(TimeUnit unit = null, bool showLevel = true) => $"[P95: {P95.ToTimeStr(unit)}] [P0: {P0.ToTimeStr(unit)}]; [P50: {P50.ToTimeStr(unit)}]; [P100: {P100.ToTimeStr(unit)})]";
Пример #8
0
 public string ToStr(bool showLevel    = true) => $"[P95: {P95.ToStr()}] [P0: {P0.ToStr()}]; [P50: {P50.ToStr()}]; [P100: {P100.ToStr()}]";
Пример #9
0
 public string ToTimeStr(TimeUnit unit = null, bool showLevel = true, Encoding encoding = null)
 {
     encoding = encoding ?? Encoding.ASCII;
     return($"[P95: {P95.ToTimeStr(unit, encoding)}] [P0: {P0.ToTimeStr(unit, encoding)}]; [P50: {P50.ToTimeStr(unit, encoding)}]; [P100: {P100.ToTimeStr(unit, encoding)})]");
 }
Пример #10
0
 public string ToStr() => $"[P95: {P95.ToStr()}] [P0: {P0.ToStr()}]; [P50: {P50.ToStr()}]; [P100: {P100.ToStr()}]";