/// <summary> /// Return an array of samples of the deviation /// </summary> /// <param name="distr"></param> /// <returns></returns> public static double[] Samples(MND.IContinuousDistribution distr, int count) { if (count < 0) return null; var result = new double[count]; for (int idx = 0; idx < count; idx++) result[idx] = distr.Sample(); return result; }
/// <summary> /// Return the mean value of a distribution /// </summary> /// <param name="distr"></param> /// <returns></returns> public static double Mean(MND.IContinuousDistribution distr) { return distr.Mean; }
/// <summary> /// Return the standard deviation of a distribution /// </summary> /// <param name="distr"></param> /// <returns></returns> public static double Deviation(MND.IContinuousDistribution distr) { return distr.StdDev; }
/// <summary> /// Return the entropy of a distribution /// </summary> /// <param name="distr"></param> /// <returns></returns> public static double Entropy(MND.IContinuousDistribution distr) { return distr.Entropy; }
/// <summary> /// Return the variance of a distribution /// </summary> /// <param name="distr"></param> /// <returns></returns> public static double Variance(MND.IContinuousDistribution distr) { return distr.Variance; }