Jpp  18.5.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JCOMPASS::JChi2 Struct Reference

Auxiliary data structure for chi2 evaluation. More...

#include <JModel.hh>

Public Member Functions

 JChi2 (const int type)
 Constructor. More...
 
double operator() (const JModel &model, const JHit &hit) const
 Fit function. More...
 

Public Attributes

JLANG::JSharedPointer
< JMEstimator
estimator
 M-Estimator function. More...
 

Detailed Description

Auxiliary data structure for chi2 evaluation.

Definition at line 189 of file JCompass/JModel.hh.

Constructor & Destructor Documentation

JCOMPASS::JChi2::JChi2 ( const int  type)
inline

Constructor.

Parameters
typeM-Estimator type

Definition at line 195 of file JCompass/JModel.hh.

195  :
196  estimator(getMEstimator(type))
197  {}
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
JMEstimator * getMEstimator(const int type)
Get M-Estimator.
Definition: JMEstimator.hh:203

Member Function Documentation

double JCOMPASS::JChi2::operator() ( const JModel model,
const JHit hit 
) const
inline

Fit function.

Parameters
modelmodel
hithit
Returns
chi2

Definition at line 207 of file JCompass/JModel.hh.

208  {
209  return estimator->getRho(getAngle(model(hit.getZ()), hit.getQuaternion()) / hit.getSigma());
210  }
double getAngle(const JQuaternion3D &first, const JQuaternion3D &second)
Get space angle between quanternions.
JLANG::JSharedPointer< JMEstimator > estimator
M-Estimator function.
double getZ() const
Get z-position.
const JQuaternion3D & getQuaternion() const
Get quaternion.
double getSigma() const
Get resolution.

Member Data Documentation

JLANG::JSharedPointer<JMEstimator> JCOMPASS::JChi2::estimator

M-Estimator function.

Definition at line 212 of file JCompass/JModel.hh.


The documentation for this struct was generated from the following file: