EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SquareGradient.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file SquareGradient.h
1 #ifndef FITNEWTON_SQUAREGRADIENT_H
2 #define FITNEWTON_SQUAREGRADIENT_H
3 
4 #include "FunctionGradHessian.h"
5 
6 #include <Eigen/Core>
7 
8 namespace FitNewton
9 {
11  {
12  public:
15 
16  // this class is intended to be used only with line-search, and so this function doesn't fill the Hessian, and really should not be called
17  bool calcValGradHessian(const Eigen::VectorXd& x, double& val, Eigen::VectorXd& grad, Eigen::MatrixXd& hessian);
18 
19  // fill the gradient of this function based on "function"
20  // this class represents the square of the magnitude of the gradient of "function",
21  // so we can calculate the val and grad from the val,grad,hessian of function
22  bool calcValGrad(const Eigen::VectorXd& x, double& val, Eigen::VectorXd& grad);
23 
24  FunctionGradHessian* Clone() const;
25 
26  bool verbose;
27 
28  protected:
30  };
31 }
32 
33 
34 
35 
36 #endif