示例#1
0
        /*
        public Estimation(ModelEstimation modelEstimation)
        {
            ByModel = modelEstimation;
        }

        public Estimation(HistoryEstimation historyEstimation)
        {
            FromHistory = historyEstimation;
        }
        */
        public Estimation(ModelEstimation modelEstimation = null, HistoryEstimation historyEstimation = null)
        {
            FromHistory = historyEstimation;

            ByModel = modelEstimation;
            ModelCoeffs = new Dictionary<string, double>();
        }
示例#2
0
        /*
         * public Estimation(ModelEstimation modelEstimation)
         * {
         *  ByModel = modelEstimation;
         * }
         *
         * public Estimation(HistoryEstimation historyEstimation)
         * {
         *  FromHistory = historyEstimation;
         * }
         */

        public Estimation(ModelEstimation modelEstimation = null, HistoryEstimation historyEstimation = null)
        {
            FromHistory = historyEstimation;

            ByModel     = modelEstimation;
            ModelCoeffs = new Dictionary <string, double>();
        }
示例#3
0
        public Estimation(Estimation otherEstimation)
        {
            _durationSurrogate = otherEstimation._durationSurrogate;

            if (otherEstimation.FromHistory != null)
            {
                FromHistory = new HistoryEstimation(otherEstimation.FromHistory);
            }

            if (otherEstimation.ModelCoeffs != null)
            {
                ModelCoeffs = new Dictionary <string, double>(otherEstimation.ModelCoeffs);
            }

            if (otherEstimation.ByModel != null)
            {
                ByModel = new ModelEstimation();

                ByModel.CalculationTime = new ValueWithDispersion <double>()
                {
                    Value      = otherEstimation.ByModel.CalculationTime.Value,
                    Dispersion = otherEstimation.ByModel.CalculationTime.Dispersion
                };

                ByModel.TotalOutputFileSize = new ValueWithDispersion <ulong>()
                {
                    Value      = otherEstimation.ByModel.TotalOutputFileSize.Value,
                    Dispersion = otherEstimation.ByModel.TotalOutputFileSize.Dispersion
                };

                if (otherEstimation.ByModel.ExtraValues != null)
                {
                    foreach (var pair in otherEstimation.ByModel.ExtraValues)
                    {
                        ByModel.ExtraValues[pair.Key] = pair.Value; // ExtraValues field is created in constructor of ModelEstimation
                    }
                }

                if (otherEstimation.ByModel.OutputFileSize != null)
                {
                    foreach (var pair in otherEstimation.ByModel.OutputFileSize)
                    {
                        ByModel.OutputFileSize[pair.Key] = new ValueWithDispersion <ulong>()
                        {
                            Value      = pair.Value.Value,
                            Dispersion = pair.Value.Dispersion
                        };
                    }
                }
            }
        }
示例#4
0
        public Estimation(Estimation otherEstimation)
        {
            _durationSurrogate = otherEstimation._durationSurrogate;

            if (otherEstimation.FromHistory != null)
                FromHistory = new HistoryEstimation(otherEstimation.FromHistory);

            if (otherEstimation.ModelCoeffs != null)
                ModelCoeffs = new Dictionary<string, double>(otherEstimation.ModelCoeffs);

            if (otherEstimation.ByModel != null)
            {
                ByModel = new ModelEstimation();

                ByModel.CalculationTime = new ValueWithDispersion<double>()
                {
                    Value = otherEstimation.ByModel.CalculationTime.Value,
                    Dispersion = otherEstimation.ByModel.CalculationTime.Dispersion
                };

                ByModel.TotalOutputFileSize = new ValueWithDispersion<ulong>()
                {
                    Value = otherEstimation.ByModel.TotalOutputFileSize.Value,
                    Dispersion = otherEstimation.ByModel.TotalOutputFileSize.Dispersion
                };

                if (otherEstimation.ByModel.ExtraValues != null)
                {
                    foreach (var pair in otherEstimation.ByModel.ExtraValues)
                        ByModel.ExtraValues[pair.Key] = pair.Value; // ExtraValues field is created in constructor of ModelEstimation
                }

                if (otherEstimation.ByModel.OutputFileSize != null)
                {
                    foreach (var pair in otherEstimation.ByModel.OutputFileSize)
                    {
                        ByModel.OutputFileSize[pair.Key] = new ValueWithDispersion<ulong>()
                        {
                            Value = pair.Value.Value,
                            Dispersion = pair.Value.Dispersion
                        };
                    }
                }
            }
        }
示例#5
0
 public HistoryEstimation(HistoryEstimation otherEstimation)
 {
     CalcDurationInSeconds = otherEstimation.CalcDurationInSeconds;
 }
示例#6
0
 public HistoryEstimation(HistoryEstimation otherEstimation)
 {
     CalcDurationInSeconds = otherEstimation.CalcDurationInSeconds;
 }