22#include <osl/diagnose.h>
33 m_fMeanValue(
std::numeric_limits<double>::quiet_NaN() )
45 const sal_Int32 nDataLength = aYValues.getLength();
46 sal_Int32 nMax = nDataLength;
48 const double * pY = aYValues.getConstArray();
50 for( sal_Int32
i = 0;
i < nDataLength; ++
i )
52 if( std::isnan( pY[
i] ) ||
72 double fErrorSum = 0.0;
73 for( sal_Int32
i = 0;
i < nDataLength; ++
i )
75 if( !std::isnan( pY[
i] ) &&
82 OSL_ASSERT( fErrorSum >= 0.0 );
94 double min,
double max, ::sal_Int32 nPointCount,
97 sal_Bool bMaySkipPointsInCalculation )
99 if( bMaySkipPointsInCalculation )
112 sal_Int32 nNumberFormatKey, sal_Int32* pFormulaLength )
const
115 if ( pFormulaLength )
117 *pFormulaLength -=
aBuf.getLength();
118 if ( *pFormulaLength <= 0 )
MeanValueRegressionCurveCalculator()
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 override
virtual ~MeanValueRegressionCurveCalculator() override
virtual void SAL_CALL recalculateRegression(const css::uno::Sequence< double > &aXValues, const css::uno::Sequence< double > &aYValues) override
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
static OUString getFormattedString(const css::uno::Reference< css::util::XNumberFormatter > &xNumFormatter, sal_Int32 nNumberFormatKey, double fNumber, const sal_Int32 *pStringLength)
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
double m_fCorrelationCoefficient
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)