Skip to content

Commit cc50dff

Browse files
committed
[Minuit2] Remove GenericFunction
This class can simply be replaced by using `std::function`, and actually it is not even used anywhere.
1 parent 614d4dc commit cc50dff

File tree

5 files changed

+4
-68
lines changed

5 files changed

+4
-68
lines changed

math/minuit2/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ if(CMAKE_PROJECT_NAME STREQUAL ROOT)
4040
Minuit2/FumiliStandardMaximumLikelihoodFCN.h
4141
Minuit2/FunctionGradient.h
4242
Minuit2/FunctionMinimum.h
43-
Minuit2/GenericFunction.h
4443
Minuit2/GradientCalculator.h
4544
Minuit2/HessianGradientCalculator.h
4645
Minuit2/InitialGradientCalculator.h

math/minuit2/inc/LinkDef.h

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
#pragma link off all classes;
1414
#pragma link off all functions;
1515

16-
//#pragma link C++ namespace ROOT::Minuit2;
17-
18-
#pragma link C++ class ROOT::Minuit2::GenericFunction;
1916
#pragma link C++ class ROOT::Minuit2::FCNBase;
2017
#pragma link C++ class ROOT::Minuit2::FCNGradientBase;
2118
#pragma link C++ class ROOT::Minuit2::FumiliFCNBase;

math/minuit2/inc/Minuit2/FCNBase.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include "Minuit2/MnConfig.h"
1414

15-
#include "Minuit2/GenericFunction.h"
16-
1715
#include <ROOT/RSpan.hxx>
1816

1917
#include <vector>
@@ -48,10 +46,12 @@ Interface (abstract class) defining the function to be minimized, which has to b
4846
4947
*/
5048

51-
class FCNBase : public GenericFunction {
49+
class FCNBase {
5250

5351
public:
5452

53+
virtual ~FCNBase() = default;
54+
5555
/**
5656
5757
The meaning of the vector of parameters is of course defined by the user,
@@ -74,7 +74,7 @@ class FCNBase : public GenericFunction {
7474
7575
*/
7676

77-
double operator()(std::vector<double> const &v) const override = 0;
77+
virtual double operator()(std::vector<double> const &v) const = 0;
7878

7979
/**
8080

math/minuit2/inc/Minuit2/GenericFunction.h

-59
This file was deleted.

math/minuit2/src/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ set(MINUIT2_HEADERS
3030
FumiliStandardMaximumLikelihoodFCN.h
3131
FunctionGradient.h
3232
FunctionMinimum.h
33-
GenericFunction.h
3433
GradientCalculator.h
3534
HessianGradientCalculator.h
3635
InitialGradientCalculator.h

0 commit comments

Comments
 (0)