EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FitNewton::GaussianRegGradHessian Class Reference

#include <fun4all_coresoftware/blob/master/offline/packages/HelixHough/FitNewton/GaussianRegGradHessian.h>

+ Inheritance diagram for FitNewton::GaussianRegGradHessian:
+ Collaboration diagram for FitNewton::GaussianRegGradHessian:

Public Member Functions

 GaussianRegGradHessian (FunctionGradHessian *func_instance, double sig, unsigned long int numthreads=1)
 
 ~GaussianRegGradHessian ()
 
void setPoints (const std::vector< std::vector< double > > &POINTS)
 
void setData (const std::vector< double > &DATA)
 
void setErrors (const std::vector< double > &ERROR)
 
void setPointsThread1 (void *arg)
 
void setErrorsThread1 (void *arg)
 
void setDataThread1 (void *arg)
 
void setFunction (FunctionGradHessian *f)
 
void resetPointsDataErrors ()
 
bool calcValGradHessian (const Eigen::VectorXd &x, double &val, Eigen::VectorXd &grad, Eigen::MatrixXd &hessian)
 
void calcValGradHessianThread1 (void *arg)
 
void getCovariance (Eigen::MatrixXd &cov)
 
FunctionGradHessianClone () const
 
void setWidth (double sig)
 
void setErrorsAreWeights (bool e_a_w)
 
void computeCovariance (const double &val, const Eigen::MatrixXd &hessian)
 
- Public Member Functions inherited from FitNewton::FunctionGradHessian
 FunctionGradHessian (unsigned int nparams=1, unsigned int nfixedparams=1)
 
virtual ~FunctionGradHessian ()
 
virtual bool calcValGrad (const Eigen::VectorXd &x, double &val, Eigen::VectorXd &grad)
 
unsigned int nPars ()
 
unsigned int nFixedPars ()
 
std::vector< double > getFixedPars ()
 
void setFixedPar (unsigned int coor, double val)
 
virtual void rescaleMove (const Eigen::VectorXd &, Eigen::VectorXd &)
 

Private Attributes

FunctionGradHessianfunc
 
const std::vector< std::vector
< double > > * 
points
 
const std::vector< double > * data
 
const std::vector< double > * data_errors
 
std::vector< std::vector
< std::vector< double > > * > 
thread_points
 
std::vector< std::vector
< double > * > 
thread_data
 
std::vector< std::vector
< double > * > 
thread_data_errors
 
const Eigen::VectorXd * current_eval
 
double * val_output
 
Eigen::VectorXd * grad_output
 
Eigen::MatrixXd * hessian_output
 
Eigen::MatrixXd covariance
 
bool data_has_errors
 
bool errors_are_weights
 
std::vector
< SeamStress::Seamstress * > * 
vssp
 
std::vector
< SeamStress::Seamstress
vss
 
SeamStress::Pincushion
< GaussianRegGradHessian > * 
pins
 
unsigned long int nthreads
 
unsigned long int thread_tot
 
unsigned long int niter
 
pthread_mutex_t mutex
 
pthread_mutexattr_t mattr
 
double sigma
 

Additional Inherited Members

- Protected Attributes inherited from FitNewton::FunctionGradHessian
unsigned int npars
 
unsigned int nfixedpars
 
std::vector< double > fixedpars
 

Detailed Description

Definition at line 17 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 17 of file GaussianRegGradHessian.h

Constructor & Destructor Documentation

FitNewton::GaussianRegGradHessian::GaussianRegGradHessian ( FunctionGradHessian func_instance,
double  sig,
unsigned long int  numthreads = 1 
)

Definition at line 15 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 15 of file GaussianRegGradHessian.cpp

References mattr, mutex, nthreads, pins, resetPointsDataErrors(), thread_data, thread_data_errors, thread_points, vss, and vssp.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FitNewton::GaussianRegGradHessian::~GaussianRegGradHessian ( )

Definition at line 40 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 40 of file GaussianRegGradHessian.cpp

References nthreads, pins, thread_data, thread_data_errors, thread_points, vss, and vssp.

Member Function Documentation

bool FitNewton::GaussianRegGradHessian::calcValGradHessian ( const Eigen::VectorXd &  x,
double &  val,
Eigen::VectorXd &  grad,
Eigen::MatrixXd &  hessian 
)
virtual

Implements FitNewton::FunctionGradHessian.

Definition at line 214 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 214 of file GaussianRegGradHessian.cpp

References calcValGradHessianThread1(), covariance, current_eval, data_errors, data_has_errors, errors_are_weights, grad_output, hessian_output, niter, FitNewton::FunctionGradHessian::npars, nthreads, pins, points, SeamStress::Pincushion< TClass >::sewStraight(), thread_tot, val_output, and x.

+ Here is the call graph for this function:

void FitNewton::GaussianRegGradHessian::calcValGradHessianThread1 ( void *  arg)

Definition at line 250 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 250 of file GaussianRegGradHessian.cpp

References FitNewton::FunctionGradHessian::calcValGradHessian(), FitNewton::FunctionGradHessian::Clone(), current_eval, data_has_errors, func, k, mutex, FitNewton::FunctionGradHessian::npars, FitNewton::FunctionGradHessian::setFixedPar(), sigma, temp1, temp2, thread_data, thread_data_errors, and thread_points.

Referenced by calcValGradHessian().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FunctionGradHessian * FitNewton::GaussianRegGradHessian::Clone ( ) const
virtual

Implements FitNewton::FunctionGradHessian.

Definition at line 180 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 180 of file GaussianRegGradHessian.cpp

References data, data_errors, data_has_errors, func, GaussianRegGradHessian(), nthreads, points, setData(), setErrors(), setPoints(), and sigma.

+ Here is the call graph for this function:

void FitNewton::GaussianRegGradHessian::computeCovariance ( const double &  val,
const Eigen::MatrixXd &  hessian 
)
virtual

Reimplemented from FitNewton::FunctionGradHessian.

Definition at line 190 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 190 of file GaussianRegGradHessian.cpp

References covariance, data_errors, data_has_errors, errors_are_weights, FitNewton::FunctionGradHessian::npars, and points.

void FitNewton::GaussianRegGradHessian::getCovariance ( Eigen::MatrixXd &  cov)

Definition at line 208 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 208 of file GaussianRegGradHessian.cpp

References covariance.

void FitNewton::GaussianRegGradHessian::resetPointsDataErrors ( )
inline

Definition at line 40 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 40 of file GaussianRegGradHessian.h

References data, data_errors, data_has_errors, and points.

Referenced by GaussianRegGradHessian().

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setData ( const std::vector< double > &  DATA)

Definition at line 141 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 141 of file GaussianRegGradHessian.cpp

References data, niter, nthreads, pins, setDataThread1(), SeamStress::Pincushion< TClass >::sewStraight(), and thread_tot.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setDataThread1 ( void *  arg)

Definition at line 152 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 152 of file GaussianRegGradHessian.cpp

References data, niter, part, start(), thread_data, and thread_tot.

Referenced by setData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setErrors ( const std::vector< double > &  ERROR)

Definition at line 102 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 102 of file GaussianRegGradHessian.cpp

References data_errors, data_has_errors, ERROR, niter, nthreads, pins, setErrorsThread1(), SeamStress::Pincushion< TClass >::sewStraight(), and thread_tot.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setErrorsAreWeights ( bool  e_a_w)
inline

Definition at line 52 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 52 of file GaussianRegGradHessian.h

References errors_are_weights.

void FitNewton::GaussianRegGradHessian::setErrorsThread1 ( void *  arg)

Definition at line 113 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 113 of file GaussianRegGradHessian.cpp

References data_errors, niter, part, start(), thread_data_errors, and thread_tot.

Referenced by setErrors().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setFunction ( FunctionGradHessian f)
inline

Definition at line 38 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 38 of file GaussianRegGradHessian.h

References func.

void FitNewton::GaussianRegGradHessian::setPoints ( const std::vector< std::vector< double > > &  POINTS)

Definition at line 58 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 58 of file GaussianRegGradHessian.cpp

References niter, nthreads, pins, points, setPointsThread1(), SeamStress::Pincushion< TClass >::sewStraight(), and thread_tot.

Referenced by Clone().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setPointsThread1 ( void *  arg)

Definition at line 69 of file GaussianRegGradHessian.cpp.

View newest version in sPHENIX GitHub at line 69 of file GaussianRegGradHessian.cpp

References niter, part, points, start(), thread_points, and thread_tot.

Referenced by setPoints().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FitNewton::GaussianRegGradHessian::setWidth ( double  sig)
inline

Definition at line 49 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 49 of file GaussianRegGradHessian.h

References sigma.

Member Data Documentation

Eigen::MatrixXd FitNewton::GaussianRegGradHessian::covariance
private

Definition at line 73 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 73 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), computeCovariance(), and getCovariance().

const Eigen::VectorXd* FitNewton::GaussianRegGradHessian::current_eval
private

Definition at line 67 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 67 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), and calcValGradHessianThread1().

const std::vector<double>* FitNewton::GaussianRegGradHessian::data
private

Definition at line 60 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 60 of file GaussianRegGradHessian.h

Referenced by Clone(), resetPointsDataErrors(), setData(), and setDataThread1().

const std::vector<double>* FitNewton::GaussianRegGradHessian::data_errors
private

Definition at line 61 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 61 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), Clone(), computeCovariance(), resetPointsDataErrors(), setErrors(), and setErrorsThread1().

bool FitNewton::GaussianRegGradHessian::data_has_errors
private

Definition at line 75 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 75 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), calcValGradHessianThread1(), Clone(), computeCovariance(), resetPointsDataErrors(), and setErrors().

bool FitNewton::GaussianRegGradHessian::errors_are_weights
private

Definition at line 76 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 76 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), computeCovariance(), and setErrorsAreWeights().

FunctionGradHessian* FitNewton::GaussianRegGradHessian::func
private

Definition at line 58 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 58 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), Clone(), and setFunction().

Eigen::VectorXd* FitNewton::GaussianRegGradHessian::grad_output
private

Definition at line 70 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 70 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian().

Eigen::MatrixXd* FitNewton::GaussianRegGradHessian::hessian_output
private

Definition at line 71 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 71 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian().

pthread_mutexattr_t FitNewton::GaussianRegGradHessian::mattr
private

Definition at line 86 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 86 of file GaussianRegGradHessian.h

Referenced by GaussianRegGradHessian().

pthread_mutex_t FitNewton::GaussianRegGradHessian::mutex
private

Definition at line 85 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 85 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), and GaussianRegGradHessian().

unsigned long int FitNewton::GaussianRegGradHessian::niter
private

Definition at line 84 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 84 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), setData(), setDataThread1(), setErrors(), setErrorsThread1(), setPoints(), and setPointsThread1().

unsigned long int FitNewton::GaussianRegGradHessian::nthreads
private

Definition at line 81 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 81 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), Clone(), GaussianRegGradHessian(), setData(), setErrors(), setPoints(), and ~GaussianRegGradHessian().

SeamStress::Pincushion<GaussianRegGradHessian>* FitNewton::GaussianRegGradHessian::pins
private

Definition at line 80 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 80 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), GaussianRegGradHessian(), setData(), setErrors(), setPoints(), and ~GaussianRegGradHessian().

const std::vector<std::vector<double> >* FitNewton::GaussianRegGradHessian::points
private

Definition at line 59 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 59 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), Clone(), computeCovariance(), resetPointsDataErrors(), setPoints(), and setPointsThread1().

double FitNewton::GaussianRegGradHessian::sigma
private

Definition at line 88 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 88 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), Clone(), and setWidth().

std::vector<std::vector<double>* > FitNewton::GaussianRegGradHessian::thread_data
private

Definition at line 64 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 64 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), GaussianRegGradHessian(), setDataThread1(), and ~GaussianRegGradHessian().

std::vector<std::vector<double>* > FitNewton::GaussianRegGradHessian::thread_data_errors
private

Definition at line 65 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 65 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), GaussianRegGradHessian(), setErrorsThread1(), and ~GaussianRegGradHessian().

std::vector<std::vector<std::vector<double> >* > FitNewton::GaussianRegGradHessian::thread_points
private

Definition at line 63 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 63 of file GaussianRegGradHessian.h

Referenced by calcValGradHessianThread1(), GaussianRegGradHessian(), setPointsThread1(), and ~GaussianRegGradHessian().

unsigned long int FitNewton::GaussianRegGradHessian::thread_tot
private

Definition at line 83 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 83 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian(), setData(), setDataThread1(), setErrors(), setErrorsThread1(), setPoints(), and setPointsThread1().

double* FitNewton::GaussianRegGradHessian::val_output
private

Definition at line 69 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 69 of file GaussianRegGradHessian.h

Referenced by calcValGradHessian().

std::vector<SeamStress::Seamstress> FitNewton::GaussianRegGradHessian::vss
private

Definition at line 79 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 79 of file GaussianRegGradHessian.h

Referenced by GaussianRegGradHessian(), and ~GaussianRegGradHessian().

std::vector<SeamStress::Seamstress*>* FitNewton::GaussianRegGradHessian::vssp
private

Definition at line 78 of file GaussianRegGradHessian.h.

View newest version in sPHENIX GitHub at line 78 of file GaussianRegGradHessian.h

Referenced by GaussianRegGradHessian(), and ~GaussianRegGradHessian().


The documentation for this class was generated from the following files: