Exemple #1
0
        private void showGraphicsButton_Click(object sender, EventArgs e)
        {
            switch (cbGraphKind.SelectedIndex)
            {
            case 0:
            {
                if (variationSeries != null)
                {
                    DisplayForm.DisplayStatFreq(variationSeries.SeriesTable);
                    LoggerEvs.writeLog("Построение полигона...");
                }
                break;
            }

            case 1:
            {
                if (intervalSeries != null)
                {
                    DisplayForm.DisplayIntervalFreq(intervalSeries.SeriesTable);
                    LoggerEvs.writeLog("Построение гистограммы...");
                }
                break;
            }

            case 2:
            {
                if (intervalSeries != null)
                {
                    EmpiricFunction.ShowEmpiricFunction(relativeSeries.SeriesTable);
                    LoggerEvs.writeLog("Построение функции распределения...");
                }
                break;
            }
            }
        }
Exemple #2
0
        private void showGraphicsButton_Click(object sender, EventArgs e)
        {
            switch (cbGraphKind.SelectedIndex)
            {
            case 0:
            {
                if (groupedSeries != null)
                {
                    SortedDictionary <double, int> modifiedSeries = new SortedDictionary <double, int>();
                    double summ = groupedSeries.ElementsCount;
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        modifiedSeries.Add(pair.Key, (int)(pair.Value * summ));
                    }
                    DisplayForm.DisplayStatFreq(modifiedSeries);
                    LoggerEvs.writeLog("Построение полигона...");
                }
                break;
            }

            case 1:
            {
                if (intSeries != null)
                {
                    DisplayForm.DisplayIntervalFreq(intSeries.SeriesTable);
                    LoggerEvs.writeLog("Построение гистограммы...");
                }
                break;
            }

            case 2:
            {
                if (groupedSeries != null)
                {
                    SortedDictionary <double, double> modifiedSeries = new SortedDictionary <double, double>();
                    double summ = 0;
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        summ += pair.Value;
                    }
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        modifiedSeries.Add(pair.Key, pair.Value / summ);
                    }
                    EmpiricFunction.ShowEmpiricFunction(modifiedSeries);
                    LoggerEvs.writeLog("Построение функции распределения...");
                }
                break;
            }
            }
        }
Exemple #3
0
        // Представление группированного ряда относительных частот
        public static void DisplayGroupRelFreq(SortedDictionary <double, double> data)
        {
            var window = new DisplayForm(data, "Полигон группированного ряда относительных частот", "X_i*", "W_i*");

            window.Show();
        }
Exemple #4
0
        // Представление интервального ряда относительных частот
        public static void DisplayIntervalRelFreq(SortedDictionary <LinearInterval, double> data)
        {
            var window = new DisplayForm(data, "Гистограмма относительных частот", "X_i", "W_i*");

            window.Show();
        }
Exemple #5
0
        // Представление ряда относительных частот
        public static void DisplayStatRelFreq(SortedDictionary <double, double> data)
        {
            var window = new DisplayForm(data, "Полигон относительных частот", "X_i", "W_i");

            window.Show();
        }
Exemple #6
0
        // Представление ряда частот
        public static void DisplayStatFreq(SortedDictionary <double, int> data)
        {
            var window = new DisplayForm(data, "Полигон частот", "X_i", "N_i");

            window.Show();
        }
Exemple #7
0
        // Построение графиков
        #region ShowGraphics

        private void showGraphicsButton_Click(object sender, EventArgs e)
        {
            switch (cbGraphKind.SelectedIndex)
            {
            case 0:
            {
                if (groupedSeries != null)
                {
                    SortedDictionary <double, int> modifiedSeries = new SortedDictionary <double, int>();
                    double summ = groupedSeries.ElementsCount;
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        modifiedSeries.Add(pair.Key, (int)(pair.Value * summ));
                    }
                    DisplayForm.DisplayStatFreq(modifiedSeries);
                    LoggerEvs.writeLog("Построение полигона...");
                }
                break;
            }

            case 1:
            {
                if (intSeries != null)
                {
                    DisplayForm.DisplayIntervalFreq(intSeries.SeriesTable);
                    LoggerEvs.writeLog("Построение гистограммы...");
                }
                break;
            }

            case 2:
            {
                if (groupedSeries != null)
                {
                    SortedDictionary <double, double> modifiedSeries = new SortedDictionary <double, double>();
                    double summ = 0;
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        summ += pair.Value;
                    }
                    foreach (var pair in groupedSeries.SeriesTable)
                    {
                        modifiedSeries.Add(pair.Key, pair.Value / summ);
                    }
                    EmpiricFunction.ShowEmpiricFunction(modifiedSeries);
                    LoggerEvs.writeLog("Построение функции распределения...");
                }
                break;
            }

            case 3:
            {
                if (groupedSeries != null)
                {
                    CheckDistributionForm wnd = new CheckDistributionForm();
                    double sampleMeanSquare   = SeriesCharacteristics.calculateSampleMeanSquareNew(groupedSeries.SeriesTable);
                    double sampleMean         = SeriesCharacteristics.calculateSampleMean(groupedSeries.SeriesTable);
                    double dispersion         = SeriesCharacteristics.calculateDispersion(groupedSeries.SeriesTable);
                    wnd.draw_distribution(groupedSeries.SeriesTable, "Выборка", sampleMean, sampleMeanSquare, Color.FromArgb(255, 255, 0, 255));
                    wnd.drawNormalDistribution(dispersion, sampleMeanSquare, sampleMean);
                    wnd.Show();
                }
                break;
            }

            case 4:
            {
                if (groupedSeries != null)
                {
                    CheckDistributionForm wnd = new CheckDistributionForm();
                    double sampleMeanSquare   = SeriesCharacteristics.calculateSampleMeanSquareNew(groupedSeries.SeriesTable);
                    double sampleMean         = SeriesCharacteristics.calculateSampleMean(groupedSeries.SeriesTable);
                    double dispersion         = SeriesCharacteristics.calculateDispersion(groupedSeries.SeriesTable);
                    wnd.draw_distribution(groupedSeries.SeriesTable, "Выборка", sampleMean, sampleMeanSquare, Color.FromArgb(255, 255, 0, 255));
                    wnd.drawExpDistribution(dispersion, sampleMeanSquare, sampleMean);
                    wnd.Show();
                }
                break;
            }
            }
        }