EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NewtonMinimizerGradHessian.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file NewtonMinimizerGradHessian.h
1 #ifndef FITNEWTON_NEWTONMINIMIZERGRADHESSIAN_H
2 #define FITNEWTON_NEWTONMINIMIZERGRADHESSIAN_H
3 
4 #include <Eigen/Core>
5 
6 #include <vector>
7 
8 namespace FitNewton
9 {
10  class FunctionGradHessian;
12  {
13  public:
16 
18 
19  bool minimize(const Eigen::VectorXd& start_point, Eigen::VectorXd& min_point, double tol=0x1.0p-30, unsigned int max_iter=1024, double abs_tol=0.);
20  bool findSaddlePoint(const Eigen::VectorXd& start_point, Eigen::VectorXd& min_point, double tol=0x1.0p-30, unsigned int max_iter=1024, double abs_tol=0.);
21 
22  void fixParameter(unsigned int par);
23  void unfixParameter(unsigned int par);
24 
25  private:
27  bool zoom(const double& wolfe1, const double& wolfe2, double& lo, double& hi, Eigen::VectorXd& try_grad, Eigen::VectorXd& direction, double& grad0_dir, double& val0, double& val_lo, Eigen::VectorXd& init_params, Eigen::VectorXd& try_params, unsigned int max_iter, double& result);
28  bool lineSearch(double& alpha, const double& wolfe1, const double& wolfe2, Eigen::VectorXd& try_grad, Eigen::VectorXd& direction, double& grad0_dir, double& val0, Eigen::VectorXd& init_params, Eigen::VectorXd& try_params, const double& precision, const double& accuracy, unsigned int max_iter, double& result);
29 
30  std::vector<int> fixparameter;
31 
32  };
33 
34 }
35 
36 #endif
37