mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 22:02:58 -06:00
ScatterDraw: Improved initial coefficients guessing
git-svn-id: svn://ultimatepp.org/upp/trunk@8190 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
df6995d35d
commit
49fcd0bcac
2 changed files with 6 additions and 2 deletions
|
|
@ -95,8 +95,13 @@ public:
|
|||
virtual String GetName() {return t_("Polynomial");}
|
||||
virtual String GetFullName() {return t_("Polynomial") + String(" n = ") + FormatInt(degree);}
|
||||
virtual String GetEquation(int numDigits = 3);
|
||||
virtual void GuessCoeff(DataSource &series) {coeff[0] = series.AvgY();}
|
||||
void SetDegree(int num) {degree = num; SetNumCoeff(num + 1);}
|
||||
virtual void GuessCoeff(DataSource &series) {
|
||||
coeff[0] = series.AvgY();
|
||||
int realDegree = degree;
|
||||
for (degree = 2; degree < realDegree; degree++)
|
||||
Fit(series);
|
||||
}
|
||||
};
|
||||
|
||||
class PolynomialEquation2 : public PolynomialEquation {
|
||||
|
|
|
|||
|
|
@ -62,4 +62,3 @@ caES("Racional_1")
|
|||
esES("Racional_1")
|
||||
euES("")
|
||||
frFR("")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue