[Libreoffice-commits] core.git: chart2/source

Andrea Gelmini (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 28 20:50:32 UTC 2020


 chart2/source/inc/RegressionCurveCalculator.hxx                |    2 +-
 chart2/source/tools/ExponentialRegressionCurveCalculator.cxx   |    4 ++--
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx   |    4 ++--
 chart2/source/tools/MeanValueRegressionCurveCalculator.cxx     |    4 ++--
 chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx |    2 +-
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx    |    6 +++---
 chart2/source/tools/PotentialRegressionCurveCalculator.cxx     |    4 ++--
 chart2/source/tools/RegressionCurveCalculator.cxx              |    6 +++---
 8 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit cafbad640727529cb3797df1f56c700557c2b764
Author:     Andrea Gelmini <andrea.gelmini at gelma.net>
AuthorDate: Sun Apr 26 17:57:42 2020 +0200
Commit:     Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Tue Apr 28 22:49:56 2020 +0200

    Fix typo in code
    
    Change-Id: I6a67206aee0b1844090d86b3fc91dc6c2e650c77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92940
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Jenkins

diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 553e1e3fc7c6..de38bcd7e725 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -56,7 +56,7 @@ protected:
 
     static void addStringToEquation( OUStringBuffer& aStrEquation, sal_Int32& nLineLength, OUStringBuffer const & aAddString, const sal_Int32* pMaxLength );
 
-    double m_fCorrelationCoeffitient;
+    double m_fCorrelationCoefficient;
 
     sal_Int32 mDegree;
     bool  mForceIntercept;
diff --git a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
index 600afa76c09b..7d85b19b5a3d 100644
--- a/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/ExponentialRegressionCurveCalculator.cxx
@@ -63,7 +63,7 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
         {
             ::rtl::math::setNan( & m_fLogSlope );
             ::rtl::math::setNan( & m_fLogIntercept );
-            ::rtl::math::setNan( & m_fCorrelationCoeffitient );// actual it is coefficient of determination
+            ::rtl::math::setNan( & m_fCorrelationCoefficient );// actual it is coefficient of determination
             return;
         }
         m_fSign = -1.0;
@@ -107,7 +107,7 @@ void SAL_CALL ExponentialRegressionCurveCalculator::recalculateRegression(
 
     m_fLogSlope = fQxy / fQx;
     m_fLogIntercept = mForceIntercept ? fLogIntercept : fAverageY - m_fLogSlope * fAverageX;
-    m_fCorrelationCoeffitient = fQxy / sqrt( fQx * fQy );
+    m_fCorrelationCoefficient = fQxy / sqrt( fQx * fQy );
 }
 
 double SAL_CALL ExponentialRegressionCurveCalculator::getCurveValue( double x )
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 3c486411b37f..c09eab50975c 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -55,7 +55,7 @@ void SAL_CALL LogarithmicRegressionCurveCalculator::recalculateRegression(
     {
         ::rtl::math::setNan( & m_fSlope );
         ::rtl::math::setNan( & m_fIntercept );
-        ::rtl::math::setNan( & m_fCorrelationCoeffitient );
+        ::rtl::math::setNan( & m_fCorrelationCoefficient );
         return;
     }
 
@@ -84,7 +84,7 @@ void SAL_CALL LogarithmicRegressionCurveCalculator::recalculateRegression(
 
     m_fSlope = fQxy / fQx;
     m_fIntercept = fAverageY - m_fSlope * fAverageX;
-    m_fCorrelationCoeffitient = fQxy / sqrt( fQx * fQy );
+    m_fCorrelationCoefficient = fQxy / sqrt( fQx * fQy );
 }
 
 double SAL_CALL LogarithmicRegressionCurveCalculator::getCurveValue( double x )
diff --git a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
index 4fe6bea036bb..c9821343b4ec 100644
--- a/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MeanValueRegressionCurveCalculator.cxx
@@ -55,7 +55,7 @@ void SAL_CALL MeanValueRegressionCurveCalculator::recalculateRegression(
             fSumY += pY[i];
     }
 
-    m_fCorrelationCoeffitient = 0.0;
+    m_fCorrelationCoefficient = 0.0;
 
     if( nMax == 0 )
     {
@@ -79,7 +79,7 @@ void SAL_CALL MeanValueRegressionCurveCalculator::recalculateRegression(
                 }
             }
             OSL_ASSERT( fErrorSum >= 0.0 );
-            m_fCorrelationCoeffitient = sqrt( fErrorSum / (nMax - 1 ));
+            m_fCorrelationCoefficient = sqrt( fErrorSum / (nMax - 1 ));
         }
     }
 }
diff --git a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
index 2ba5df0b6fca..7774bec02a4f 100644
--- a/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/MovingAverageRegressionCurveCalculator.cxx
@@ -40,7 +40,7 @@ void SAL_CALL MovingAverageRegressionCurveCalculator::recalculateRegression(
     const uno::Sequence< double >& aXValues,
     const uno::Sequence< double >& aYValues )
 {
-    ::rtl::math::setNan( & m_fCorrelationCoeffitient );
+    ::rtl::math::setNan( & m_fCorrelationCoefficient );
 
     RegressionCalculationHelper::tDoubleVectorPair aValues(
         RegressionCalculationHelper::cleanup(
diff --git a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
index c06a04ab0d96..b3585b71f5e3 100644
--- a/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PolynomialRegressionCurveCalculator.cxx
@@ -80,9 +80,9 @@ void PolynomialRegressionCurveCalculator::computeCorrelationCoefficient(
     }
 
     if (aRSquared > 0.0)
-        m_fCorrelationCoeffitient = std::sqrt(aRSquared);
+        m_fCorrelationCoefficient = std::sqrt(aRSquared);
     else
-        m_fCorrelationCoeffitient = 0.0;
+        m_fCorrelationCoefficient = 0.0;
 }
 
 // ____ XRegressionCurveCalculator ____
@@ -90,7 +90,7 @@ void SAL_CALL PolynomialRegressionCurveCalculator::recalculateRegression(
     const uno::Sequence< double >& aXValues,
     const uno::Sequence< double >& aYValues )
 {
-    rtl::math::setNan(&m_fCorrelationCoeffitient);
+    rtl::math::setNan(&m_fCorrelationCoefficient);
 
     RegressionCalculationHelper::tDoubleVectorPair aValues(
         RegressionCalculationHelper::cleanup( aXValues, aYValues, RegressionCalculationHelper::isValid()));
diff --git a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
index 5ced438e1a3f..eb054bd8db66 100644
--- a/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/PotentialRegressionCurveCalculator.cxx
@@ -63,7 +63,7 @@ void SAL_CALL PotentialRegressionCurveCalculator::recalculateRegression(
         {
             ::rtl::math::setNan( & m_fSlope );
             ::rtl::math::setNan( & m_fIntercept );
-            ::rtl::math::setNan( & m_fCorrelationCoeffitient );
+            ::rtl::math::setNan( & m_fCorrelationCoefficient );
             return;
         }
         m_fSign = -1.0;
@@ -94,7 +94,7 @@ void SAL_CALL PotentialRegressionCurveCalculator::recalculateRegression(
 
     m_fSlope = fQxy / fQx;
     m_fIntercept = fAverageY - m_fSlope * fAverageX;
-    m_fCorrelationCoeffitient = fQxy / sqrt( fQx * fQy );
+    m_fCorrelationCoefficient = fQxy / sqrt( fQx * fQy );
 
     m_fIntercept = m_fSign * exp( m_fIntercept );
 }
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index cd6fd9d182be..5b65375b0376 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -37,14 +37,14 @@ namespace chart
 {
 
 RegressionCurveCalculator::RegressionCurveCalculator() :
-        m_fCorrelationCoeffitient(0.0),
+        m_fCorrelationCoefficient(0.0),
         mDegree(2),
         mForceIntercept(false),
         mInterceptValue(0.0),
         mPeriod(2),
         mXName("x"), mYName("f(x)")
 {
-    rtl::math::setNan( &m_fCorrelationCoeffitient );
+    rtl::math::setNan( &m_fCorrelationCoefficient );
     rtl::math::setNan( &mInterceptValue );
 }
 
@@ -167,7 +167,7 @@ Sequence< geometry::RealPoint2D > SAL_CALL RegressionCurveCalculator::getCurveVa
 
 double SAL_CALL RegressionCurveCalculator::getCorrelationCoefficient()
 {
-    return m_fCorrelationCoeffitient;
+    return m_fCorrelationCoefficient;
 }
 
 OUString SAL_CALL RegressionCurveCalculator::getRepresentation()


More information about the Libreoffice-commits mailing list