public void Add(Distribution newEntry) { P10.Add(newEntry.P10); P25.Add(newEntry.P25); P50.Add(newEntry.P50); P75.Add(newEntry.P75); }
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); }
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); }