Trend line: differences between RegressionCurveCalculators

Laurent BP jumbo4444 at yahoo.fr
Fri Sep 25 13:33:27 PDT 2015


Hello,

I'm working on improvements on trend line equation and I proposed a commit:
https://gerrit.libreoffice.org/18397/
I noticed that there are some differences between
RegressionCurveCalculators:

1. LogarithmicRegressionCurveCalculator is using "fabs()" 
http://opengrok.libreoffice.org/xref/core/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx#141
but PolynomialRegressionCurveCalculator is using "std::abs()"
http://opengrok.libreoffice.org/xref/core/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx#258
Which one is better?

2. RegressionCalculationHelper.hxx defines two unicode constants. 
#define UC_MINUS_SIGN (sal_Unicode('-'))
opengrok.libreoffice.org/xref/core/chart2/source/inc/RegressionCalculationHelper.hxx#29
But they are only used is LogarithmicRegressionCurveCalculator.cxx.
opengrok.libreoffice.org/xref/core/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx#159
Other RegressionCurveCalculators do not use them
Should these #define be removed or should they be used by other
RegressionCurveCalculators?

Best regards,

Laurent BP



-----
LibreOffice 4.3.6.2
--
View this message in context: http://nabble.documentfoundation.org/Trend-line-differences-between-RegressionCurveCalculators-tp4161350.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list