public RegressionOutputs CloneBasicStatistics() { RegressionOutputs newOutputs = new RegressionOutputs(); if (Coeffs != null) { newOutputs.Coeffs = new double[Coeffs.Length]; Coeffs.CopyTo(newOutputs.Coeffs, 0); } newOutputs.Rsquared = Rsquared; newOutputs.AdjRsquared = AdjRsquared; newOutputs.StandardError = StandardError; if (Tstats != null) { newOutputs.Tstats = new double[Tstats.Length]; Tstats.CopyTo(newOutputs.Tstats, 0); } if (CoeffsStandardErrors != null) { newOutputs.CoeffsStandardErrors = new double[CoeffsStandardErrors.Length]; CoeffsStandardErrors.CopyTo(newOutputs.CoeffsStandardErrors, 0); } newOutputs.CV = CV; newOutputs.NMBE = NMBE; return(newOutputs); }
private void RemoveCoeff_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { if (coeffStackPanel.Children.Count > 2) { Coeffs.Remove(lastCoeffLetter); coeffStackPanel.Children.RemoveAt(coeffStackPanel.Children.Count - 3); lastCoeffLetter--; UpdatePolynomDiagram(); } }
private void AddNewCoeff_Click(object sender, Windows.UI.Xaml.RoutedEventArgs e) { lastCoeffLetter++; Coeffs.Add(lastCoeffLetter, 0.01); var coeffUC = new CoeffUserControl(lastCoeffLetter); //coeffUC.TextBox_BeforeTextChangingEv += TextBox_BeforeTextChanging; coeffUC.TextBox_KeyDownEv += TextBox_KeyDown; coeffUC.Slider_ValueChangedEv += Slider_ValueChanged; coeffStackPanel.Children.Insert(coeffStackPanel.Children.Count - 2, coeffUC); UpdatePolynomDiagram(); }
public override bool Equals(object obj) => obj is Polynomial polynomial && Degree == polynomial.Degree && Enumerable.SequenceEqual(Coeffs, polynomial.Coeffs);
/// <summary> /// This method returns the coefficcients of the Polynomial as an array the "IsFlipped" property, /// which is set during construction is taken into account automatically. /// </summary> /// <returns>the coefficcients of the Polynomial as an array</returns> public double[] ToArray() { return(Coeffs.ToArray()); }