public static StatisticRelativeАrequenceSeries calculateFromVariationSeries(VariationSeries varSeries) { StatisticRelativeАrequenceSeries currentSeries = new StatisticRelativeАrequenceSeries(); currentSeries.varSeries = varSeries; currentSeries.calculateElementsCount(); currentSeries.calculateRelativeSeries(); return(currentSeries); }
public static GroupedRelativeArequenceSeries calculateFromVariationSeries(VariationSeries varSeries, int intervalsCount) { GroupedRelativeArequenceSeries currentSeries = new GroupedRelativeArequenceSeries(); currentSeries.varSeries = varSeries; currentSeries.intervalSeries = varSeries.getIntervalVariationSeries(intervalsCount); currentSeries.calculateElementsCount(); currentSeries.addElementsToTable(); return(currentSeries); }
/// <summary> /// Функция-ферма для данного класса. Создавать объекты только ей. /// </summary> /// <returns></returns> public static VariationSeries calculateSerires() { VariationSeries variationSeries = new VariationSeries(); if (SourceValues.valuesTable == null) { throw new ArgumentException("Нельзя расчитать ряды без выборки. Введите выборку."); } foreach (double currentElementFromValues in SourceValues.valuesTable) { variationSeries.addElementToSeriesTable(currentElementFromValues); } return(variationSeries); }
private void fillTable() { if (SourceValues.valuesTable != null) { variationSeries = VariationSeries.calculateSerires(); relativeSeries = variationSeries.getRelativeSeries(); intervalSeries = variationSeries.getIntervalVariationSeries((int)intervalsCountUpDown.Value); groupedRelativeSeries = variationSeries.getGroupedRelativeArequenceSeries((int)intervalsCountUpDown.Value); calculated = true; printTable(); } else { string errMsg = "Необходимо загрузить выборку из файла. Выберите файл с выборкой."; MessageBox.Show(errMsg, "Внимание"); LoggerEvs.writeLog(errMsg); LoggerEvs.writeLog("Открытие входной выборки..."); if (openDataInputFile()) { LoggerEvs.writeLog("Входная выборка успешно открыта!"); fillTable(); } } }
public static IntervalVariationStatisticSeries calculateSeriesFromVariationSeriesAndIntervalLength(VariationSeries varSeries, int intervalsCount) { IntervalVariationStatisticSeries currentSeries = new IntervalVariationStatisticSeries(); currentSeries.varSeries = varSeries; currentSeries.calculateDeltaInterval(intervalsCount); currentSeries.addIntervalsWithValues(intervalsCount); return(currentSeries); }