DDASToys for NSCLDAQ  6.2-000
CFitEngine.h
Go to the documentation of this file.
1 /*
2  This software is Copyright by the Board of Trustees of Michigan
3  State University (c) Copyright 2017.
4 
5  You may use this software under the terms of the GNU public license
6  (GPL). The terms of this license are described at:
7 
8  http://www.gnu.org/licenses/gpl.txt
9 
10  Authors:
11  Ron Fox
12  Giordano Cerriza
13  Aaron Chester
14  FRIB
15  Michigan State University
16  East Lansing, MI 48824-1321
17 */
18 
24 #ifndef CFITENGINE_H
25 #define CFITENGINE_H
26 
27 #include <cstdint>
28 #include <vector>
29 #include <gsl/gsl_vector.h>
30 #include <gsl/gsl_matrix.h>
31 
33 namespace ddastoys {
34 
41  class CFitEngine {
42  protected:
43  std::vector<uint16_t> x;
44  std::vector<uint16_t> y;
45  public:
50  CFitEngine(std::vector<std::pair<uint16_t, uint16_t>>& data);
52  virtual ~CFitEngine() {}
54  virtual void jacobian(const gsl_vector* p, gsl_matrix *J) = 0;
56  virtual void residuals(const gsl_vector* p, gsl_vector* r) = 0;
57  };
58 
59 }
60 
61 #endif
Abstract base class for marshalling data to the fitting subsystems to calculate Jacobian elements and...
Definition: CFitEngine.h:41
CFitEngine(std::vector< std::pair< uint16_t, uint16_t >> &data)
Constructor.
Definition: CFitEngine.cpp:30
virtual ~CFitEngine()
Destructor.
Definition: CFitEngine.h:52
std::vector< uint16_t > x
Trace x coordinate vector.
Definition: CFitEngine.h:43
virtual void jacobian(const gsl_vector *p, gsl_matrix *J)=0
Virtual method for calculating the Jacobian matrix.
virtual void residuals(const gsl_vector *p, gsl_vector *r)=0
Virtual method to calculating the residual.
std::vector< uint16_t > y
Trace y coordinate vector.
Definition: CFitEngine.h:44