Ejemplo n.º 1
0
        public static void AddCharts(ZedGraphControl pdf, ZedGraphControl cdf, DistributionsPair distributions, int length)
        {
            AddChart(pdf, cdf, distributions.RandomsAlgebra, Languages.GetText("RandomsAlgebra"), Color.Blue, length);
            AddChart(pdf, cdf, distributions.MonteCarlo, Languages.GetText("MonteCarlo"), Color.Red, length);

            InvalidateChart(pdf);
            InvalidateChart(cdf);
        }
        public static List <DistributionParameters> GetParameters(DistributionsPair distributions, double p)
        {
            var randomsAlgebra = distributions.RandomsAlgebra;
            var monteCarlo     = distributions.MonteCarlo;

            List <DistributionParameters> parameters = new List <DistributionParameters>();

            parameters.Add(new DistributionParameters("t, ms", distributions.RandomsAlgebraTime?.TotalMilliseconds, distributions.MonteCarloTime?.TotalMilliseconds));
            parameters.Add(new DistributionParameters("μ", randomsAlgebra?.Mean, monteCarlo?.Mean));
            parameters.Add(new DistributionParameters("σ", randomsAlgebra?.StandardDeviation, monteCarlo?.StandardDeviation));
            parameters.Add(new DistributionParameters("σ²", randomsAlgebra?.Variance, monteCarlo?.Variance));
            parameters.Add(new DistributionParameters("U⁺", randomsAlgebra?.QuantileUpper(p), monteCarlo?.QuantileUpper(p)));
            parameters.Add(new DistributionParameters("U⁻", randomsAlgebra?.QuantileLower(p), monteCarlo?.QuantileLower(p)));
            parameters.Add(new DistributionParameters("γ", randomsAlgebra?.Skewness, monteCarlo?.Skewness));
            parameters.Add(new DistributionParameters("U±", randomsAlgebra?.QuantileRange(p), monteCarlo?.QuantileRange(p)));

            return(parameters);
        }
Ejemplo n.º 3
0
        public static string ExportToText(DistributionsPair pair)
        {
            StringBuilder sb = new StringBuilder();

            if (pair.RandomsAlgebra != null)
            {
                sb.AppendLine(Languages.GetText("RandomsAlgebra"));
                AppendDistribution(sb, pair.RandomsAlgebra);
            }

            if (pair.MonteCarlo != null)
            {
                sb.AppendLine(Languages.GetText("MonteCarlo"));
                AppendDistribution(sb, pair.MonteCarlo);
            }

            return(sb.ToString());
        }