LibreOffice Module chart2 (master) 1
|
#include <PolynomialRegressionCurveCalculator.hxx>
Public Member Functions | |
PolynomialRegressionCurveCalculator () | |
virtual | ~PolynomialRegressionCurveCalculator () override |
Public Member Functions inherited from chart::RegressionCurveCalculator | |
RegressionCurveCalculator () | |
virtual | ~RegressionCurveCalculator () override |
virtual void SAL_CALL | setRegressionProperties (sal_Int32 aDegree, sal_Bool aForceIntercept, double aInterceptValue, sal_Int32 aPeriod, sal_Int32 nMovingType) override |
virtual void SAL_CALL | recalculateRegression (const css::uno::Sequence< double > &aXValues, const css::uno::Sequence< double > &aYValues) override=0 |
virtual double SAL_CALL | getCurveValue (double x) override=0 |
virtual css::uno::Sequence< css::geometry::RealPoint2D > SAL_CALL | getCurveValues (double min, double max, sal_Int32 nPointCount, const css::uno::Reference< css::chart2::XScaling > &xScalingX, const css::uno::Reference< css::chart2::XScaling > &xScalingY, sal_Bool bMaySkipPointsInCalculation) override |
virtual double SAL_CALL | getCorrelationCoefficient () override |
virtual OUString SAL_CALL | getRepresentation () override |
virtual OUString SAL_CALL | getFormattedRepresentation (const css::uno::Reference< css::util::XNumberFormatsSupplier > &xNumFmtSupplier, sal_Int32 nNumberFormatKey, sal_Int32 nFormulaLength) override |
virtual void SAL_CALL | setXYNames (const OUString &aXName, const OUString &aYName) override |
Protected Member Functions | |
virtual OUString | ImplGetRepresentation (const css::uno::Reference< css::util::XNumberFormatter > &xNumFormatter, sal_Int32 nNumberFormatKey, sal_Int32 *pFormulaMaxWidth=nullptr) const override |
virtual double SAL_CALL | getCurveValue (double x) override |
virtual OUString | ImplGetRepresentation (const css::uno::Reference< css::util::XNumberFormatter > &xNumFormatter, sal_Int32 nNumberFormatKey, sal_Int32 *pFormulaLength=nullptr) const =0 |
Private Member Functions | |
virtual void SAL_CALL | recalculateRegression (const css::uno::Sequence< double > &aXValues, const css::uno::Sequence< double > &aYValues) override |
void | computeCorrelationCoefficient (RegressionCalculationHelper::tDoubleVectorPair &rValues, const sal_Int32 aNoValues, double yAverage) |
Private Attributes | |
std::vector< double > | mCoefficients |
Additional Inherited Members | |
Static Public Member Functions inherited from chart::RegressionCurveCalculator | |
static bool | isLinearScaling (const css::uno::Reference< css::chart2::XScaling > &xScaling) |
static bool | isLogarithmicScaling (const css::uno::Reference< css::chart2::XScaling > &xScaling) |
Static Protected Member Functions inherited from chart::RegressionCurveCalculator | |
static OUString | getFormattedString (const css::uno::Reference< css::util::XNumberFormatter > &xNumFormatter, sal_Int32 nNumberFormatKey, double fNumber, const sal_Int32 *pStringLength) |
static void | addStringToEquation (OUStringBuffer &aStrEquation, sal_Int32 &nLineLength, OUStringBuffer const &aAddString, const sal_Int32 *pMaxLength) |
Protected Attributes inherited from chart::RegressionCurveCalculator | |
double | m_fCorrelationCoefficient |
sal_Int32 | mDegree |
bool | mForceIntercept |
double | mInterceptValue |
sal_Int32 | mPeriod |
OUString | mXName |
OUString | mYName |
sal_Int32 | mnMovingType |
Definition at line 32 of file PolynomialRegressionCurveCalculator.hxx.
chart::PolynomialRegressionCurveCalculator::PolynomialRegressionCurveCalculator | ( | ) |
Definition at line 44 of file PolynomialRegressionCurveCalculator.cxx.
|
overridevirtual |
Definition at line 47 of file PolynomialRegressionCurveCalculator.cxx.
|
private |
Definition at line 50 of file PolynomialRegressionCurveCalculator.cxx.
References div(), getCurveValue(), i, chart::RegressionCurveCalculator::m_fCorrelationCoefficient, chart::RegressionCurveCalculator::mForceIntercept, and chart::RegressionCurveCalculator::mInterceptValue.
Referenced by recalculateRegression().
|
overrideprotectedvirtual |
Implements chart::RegressionCurveCalculator.
Definition at line 271 of file PolynomialRegressionCurveCalculator.cxx.
References i, mCoefficients, and x.
Referenced by computeCorrelationCoefficient(), and chart::LinearRegressionCurveCalculator::getCurveValues().
|
overrideprotectedvirtual |
Implements chart::RegressionCurveCalculator.
Definition at line 287 of file PolynomialRegressionCurveCalculator.cxx.
References aBuf, chart::RegressionCurveCalculator::addStringToEquation(), aMinusSign, aSuperscriptFigures, chart::RegressionCurveCalculator::getFormattedString(), i, mCoefficients, chart::RegressionCurveCalculator::mXName, chart::RegressionCurveCalculator::mYName, n, nIndex, and u.
|
overrideprivatevirtual |
Implements chart::RegressionCurveCalculator.
Definition at line 90 of file PolynomialRegressionCurveCalculator.cxx.
References a, alpha, chart::RegressionCalculationHelper::cleanup(), computeCorrelationCoefficient(), i, chart::lcl_GetDotProduct(), chart::RegressionCurveCalculator::m_fCorrelationCoefficient, mCoefficients, chart::RegressionCurveCalculator::mDegree, chart::RegressionCurveCalculator::mForceIntercept, chart::RegressionCurveCalculator::mInterceptValue, and x.
|
private |
Definition at line 56 of file PolynomialRegressionCurveCalculator.hxx.
Referenced by getCurveValue(), ImplGetRepresentation(), and recalculateRegression().