diff options
author | Deena Francis <deena.francis@gmail.com> | 2019-12-16 18:47:11 +0530 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-03-02 22:13:35 +0100 |
commit | 71f0e475017e4a979b071e6808361eba187bc00f (patch) | |
tree | 29512ef7ab17e95207b4fcd610f7cd498b0ac8aa /chart2/source/inc | |
parent | tdf#130515 Time field in Base form will not display correct format (diff) | |
download | core-71f0e475017e4a979b071e6808361eba187bc00f.tar.gz core-71f0e475017e4a979b071e6808361eba187bc00f.zip |
tdf#128995: Special case for single variable regression...
like in LINEST implementation in Calc. Use a straightforward
regression solver in this case, so that it is easier to
handle the numerical error in the intercept term using
::rtl::math::approxSub().
Change-Id: I627c0c48e377cac5385a85050c4f472ee963f3d6
Reviewed-on: https://gerrit.libreoffice.org/85222
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 8df6f6ec12972ce2c14a162e6f4dd2c0d32367ef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85504
Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/PolynomialRegressionCurveCalculator.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx index 6037fc742a78..e47d882d4903 100644 --- a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx +++ b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx @@ -22,6 +22,11 @@ #include "RegressionCurveCalculator.hxx" #include <vector> +namespace RegressionCalculationHelper +{ + typedef std::pair< std::vector< double >, std::vector< double > > tDoubleVectorPair; +} + namespace chart { @@ -44,6 +49,11 @@ private: const css::uno::Sequence<double>& aXValues, const css::uno::Sequence<double>& aYValues ) override; + void computeCorrelationCoefficient( + RegressionCalculationHelper::tDoubleVectorPair& rValues, + const sal_Int32 aNoValues, + double yAverage ); + std::vector<double> mCoefficients; }; |