/* 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>(); }
/* * 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>(); }
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 }; } } } }
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 }; } } } }
public HistoryEstimation(HistoryEstimation otherEstimation) { CalcDurationInSeconds = otherEstimation.CalcDurationInSeconds; }