public void BuildRep() { disprows.Add(new DataLoad("a", Coefficients.a)); disprows.Add(new DataLoad("b", Coefficients.b)); disprows.Add(new DataLoad("c", Coefficients.c)); disprows.Add(new DataLoad("d", Coefficients.d)); disprows.Add(new DataLoad("variance a", Coefficients.var_a)); disprows.Add(new DataLoad("variance b", Coefficients.var_b)); disprows.Add(new DataLoad("variance c", Coefficients.var_c)); disprows.Add(new DataLoad("variance d", Coefficients.var_d)); disprows.Add(new DataLoad("covariance ab", Coefficients.covar(Coeff.a, Coeff.b))); disprows.Add(new DataLoad("covariance ac", Coefficients.covar(Coeff.a, Coeff.c))); disprows.Add(new DataLoad("covariance ad", Coefficients.covar(Coeff.a, Coeff.d))); disprows.Add(new DataLoad("covariance bc", Coefficients.covar(Coeff.b, Coeff.c))); disprows.Add(new DataLoad("covariance bd", Coefficients.covar(Coeff.b, Coeff.d))); disprows.Add(new DataLoad("covariance cd", Coefficients.covar(Coeff.c, Coeff.d))); for (int i = 0; i < CalcDataList.Count; i++) { DoublesDclMass ddm = CalcDataList[i]; disprows.Add(new DataLoad(ddm.Mass.v, ddm.Doubles.v)); } }
bool DetectChangeAndCopyIt() { DataGridViewRowCollection rows = CoeffView.Rows; bool change = false; int i = 0; switch (CurveEquation) { case INCCAnalysisParams.CurveEquation.CUBIC: // a b c d if (Coefficients.a != (double)rows[i].Tag) { Coefficients.a = (double)rows[i].Tag; change = true; } i++; if (Coefficients.b != (double)rows[i].Tag) { Coefficients.b = (double)rows[i].Tag; change = true; } i++; if (Coefficients.c != (double)rows[i].Tag) { Coefficients.c = (double)rows[i].Tag; change = true; } i++; if (Coefficients.d != (double)rows[i].Tag) { Coefficients.d = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_a != (double)rows[i].Tag) { Coefficients.var_a = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_b != (double)rows[i].Tag) { Coefficients.var_b = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_c != (double)rows[i].Tag) { Coefficients.var_c = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_d != (double)rows[i].Tag) { Coefficients.var_d = (double)rows[i].Tag; change = true; } i++; if (Coefficients.covar(Coeff.a, Coeff.b) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.a, Coeff.b, (double)rows[i].Tag); change = true; } i++; if (Coefficients.covar(Coeff.a, Coeff.c) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.a, Coeff.c, (double)rows[i].Tag); change = true; } i++; if (Coefficients.covar(Coeff.a, Coeff.d) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.a, Coeff.d, (double)rows[i].Tag); change = true; } i++; if (Coefficients.covar(Coeff.b, Coeff.c) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.b, Coeff.c, (double)rows[i].Tag); change = true; } i++; if (Coefficients.covar(Coeff.b, Coeff.d) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.b, Coeff.d, (double)rows[i].Tag); change = true; } i++; if (Coefficients.covar(Coeff.c, Coeff.d) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.c, Coeff.d, (double)rows[i].Tag); change = true; } i++; break; case INCCAnalysisParams.CurveEquation.POWER: // a b case INCCAnalysisParams.CurveEquation.HOWARDS: // a b case INCCAnalysisParams.CurveEquation.EXPONENTIAL: // a b if (Coefficients.a != (double)rows[i].Tag) { Coefficients.a = (double)rows[i].Tag; change = true; } i++; if (Coefficients.b != (double)rows[i].Tag) { Coefficients.b = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_a != (double)rows[i].Tag) { Coefficients.var_a = (double)rows[i].Tag; change = true; } i++; if (Coefficients.var_b != (double)rows[i].Tag) { Coefficients.var_b = (double)rows[i].Tag; change = true; } i++; if (Coefficients.covar(Coeff.a, Coeff.b) != (double)rows[i].Tag) { Coefficients.setcovar(Coeff.a, Coeff.b, (double)rows[i].Tag); change = true; } i++; break; } return(change); }