Skip to content
Snippets Groups Projects
Commit f030b377 authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Unused method removed

parent a66bcc2e
No related branches found
No related tags found
No related merge requests found
...@@ -22,15 +22,6 @@ SquaredFunctionDefault* SquaredFunctionDefault::clone() const ...@@ -22,15 +22,6 @@ SquaredFunctionDefault* SquaredFunctionDefault::clone() const
return new SquaredFunctionDefault(); return new SquaredFunctionDefault();
} }
double SquaredFunctionDefault::calculateSquaredDifference(
double real_value, double simulated_value) const
{
if (Numeric::areAlmostEqual(real_value, simulated_value))
return 0.;
double diff_squared = (simulated_value-real_value)*(simulated_value-real_value);
double normalization = calculateSquaredError(real_value);
return diff_squared/normalization;
}
double SquaredFunctionDefault::calculateSquaredError( double SquaredFunctionDefault::calculateSquaredError(
double real_value, double simulated_value) const double real_value, double simulated_value) const
...@@ -46,15 +37,6 @@ SquaredFunctionSimError* SquaredFunctionSimError::clone() const ...@@ -46,15 +37,6 @@ SquaredFunctionSimError* SquaredFunctionSimError::clone() const
return new SquaredFunctionSimError(); return new SquaredFunctionSimError();
} }
double SquaredFunctionSimError::calculateSquaredDifference(
double real_value, double simulated_value) const
{
if (Numeric::areAlmostEqual(real_value, simulated_value))
return 0.0;
double diff_squared = (simulated_value-real_value)*(simulated_value-real_value);
double normalization = calculateSquaredError(real_value, simulated_value);
return diff_squared/normalization;
}
double SquaredFunctionSimError::calculateSquaredError(double, double simulated_value) const double SquaredFunctionSimError::calculateSquaredError(double, double simulated_value) const
{ {
...@@ -68,14 +50,6 @@ SquaredFunctionMeanSquaredError* SquaredFunctionMeanSquaredError::clone() const ...@@ -68,14 +50,6 @@ SquaredFunctionMeanSquaredError* SquaredFunctionMeanSquaredError::clone() const
return new SquaredFunctionMeanSquaredError(); return new SquaredFunctionMeanSquaredError();
} }
double SquaredFunctionMeanSquaredError::calculateSquaredDifference(
double real_value, double simulated_value) const
{
if (Numeric::areAlmostEqual(real_value, simulated_value)) return 0.0;
double diff_squared = (simulated_value-real_value)*(simulated_value-real_value);
double normalization = calculateSquaredError(real_value, simulated_value);
return diff_squared/normalization;
}
double SquaredFunctionMeanSquaredError::calculateSquaredError( double SquaredFunctionMeanSquaredError::calculateSquaredError(
double real_value, double simulated_value) const double real_value, double simulated_value) const
...@@ -93,13 +67,6 @@ SquaredFunctionSystematicError* SquaredFunctionSystematicError::clone() const ...@@ -93,13 +67,6 @@ SquaredFunctionSystematicError* SquaredFunctionSystematicError::clone() const
return new SquaredFunctionSystematicError(m_epsilon); return new SquaredFunctionSystematicError(m_epsilon);
} }
double SquaredFunctionSystematicError::calculateSquaredDifference(
double real_value, double simulated_value) const
{
double diff_squared = (simulated_value-real_value)*(simulated_value-real_value);
double normalization = calculateSquaredError(real_value, simulated_value);
return diff_squared/normalization;
}
double SquaredFunctionSystematicError::calculateSquaredError(double real_value, double) const double SquaredFunctionSystematicError::calculateSquaredError(double real_value, double) const
{ {
...@@ -113,13 +80,6 @@ SquaredFunctionGaussianError*SquaredFunctionGaussianError::clone() const ...@@ -113,13 +80,6 @@ SquaredFunctionGaussianError*SquaredFunctionGaussianError::clone() const
return new SquaredFunctionGaussianError(m_sigma); return new SquaredFunctionGaussianError(m_sigma);
} }
double SquaredFunctionGaussianError::calculateSquaredDifference(
double real_value, double simulated_value) const
{
double diff_squared = (simulated_value-real_value)*(simulated_value-real_value);
double sigma_squared = m_sigma*m_sigma;
return diff_squared/sigma_squared;
}
double SquaredFunctionGaussianError::calculateSquaredError(double, double) const double SquaredFunctionGaussianError::calculateSquaredError(double, double) const
{ {
......
...@@ -27,8 +27,6 @@ public: ...@@ -27,8 +27,6 @@ public:
ISquaredFunction() {} ISquaredFunction() {}
virtual ~ISquaredFunction() {} virtual ~ISquaredFunction() {}
virtual ISquaredFunction* clone() const =0; virtual ISquaredFunction* clone() const =0;
virtual double calculateSquaredDifference(
double real_value, double simulated_value) const =0;
virtual double calculateSquaredError( virtual double calculateSquaredError(
double real_value, double simulated_value = 0.0) const =0; double real_value, double simulated_value = 0.0) const =0;
...@@ -47,7 +45,6 @@ public: ...@@ -47,7 +45,6 @@ public:
SquaredFunctionDefault() {} SquaredFunctionDefault() {}
~SquaredFunctionDefault() {} ~SquaredFunctionDefault() {}
SquaredFunctionDefault* clone() const override; SquaredFunctionDefault* clone() const override;
double calculateSquaredDifference(double real_value, double simulated_value) const override;
double calculateSquaredError(double real_value, double simulated_value = 0) const override; double calculateSquaredError(double real_value, double simulated_value = 0) const override;
}; };
...@@ -62,7 +59,6 @@ public: ...@@ -62,7 +59,6 @@ public:
SquaredFunctionSimError() {} SquaredFunctionSimError() {}
~SquaredFunctionSimError() {} ~SquaredFunctionSimError() {}
SquaredFunctionSimError *clone() const override; SquaredFunctionSimError *clone() const override;
double calculateSquaredDifference(double real_value, double simulated_value) const override;
double calculateSquaredError(double real_value, double simulated_value) const override; double calculateSquaredError(double real_value, double simulated_value) const override;
}; };
...@@ -78,7 +74,6 @@ public: ...@@ -78,7 +74,6 @@ public:
SquaredFunctionMeanSquaredError() {} SquaredFunctionMeanSquaredError() {}
~SquaredFunctionMeanSquaredError() {} ~SquaredFunctionMeanSquaredError() {}
SquaredFunctionMeanSquaredError* clone() const override; SquaredFunctionMeanSquaredError* clone() const override;
double calculateSquaredDifference(double real_value, double simulated_value) const override;
double calculateSquaredError(double real_value, double simulated_value) const override; double calculateSquaredError(double real_value, double simulated_value) const override;
}; };
...@@ -93,7 +88,6 @@ public: ...@@ -93,7 +88,6 @@ public:
SquaredFunctionSystematicError(double epsilon = 0.08) : m_epsilon(epsilon){} SquaredFunctionSystematicError(double epsilon = 0.08) : m_epsilon(epsilon){}
~SquaredFunctionSystematicError() {} ~SquaredFunctionSystematicError() {}
SquaredFunctionSystematicError *clone() const override; SquaredFunctionSystematicError *clone() const override;
double calculateSquaredDifference(double real_value, double simulated_value) const override;
double calculateSquaredError(double real_value, double simulated_value) const override; double calculateSquaredError(double real_value, double simulated_value) const override;
private: private:
double m_epsilon; double m_epsilon;
...@@ -110,7 +104,6 @@ public: ...@@ -110,7 +104,6 @@ public:
SquaredFunctionGaussianError(double sigma = 0.01) : m_sigma(sigma){} SquaredFunctionGaussianError(double sigma = 0.01) : m_sigma(sigma){}
~SquaredFunctionGaussianError() {} ~SquaredFunctionGaussianError() {}
SquaredFunctionGaussianError *clone() const override; SquaredFunctionGaussianError *clone() const override;
double calculateSquaredDifference(double real_value, double simulated_value) const override;
double calculateSquaredError(double real_value, double simulated_value) const override; double calculateSquaredError(double real_value, double simulated_value) const override;
private: private:
double m_sigma; double m_sigma;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment