| 1 | // This may look like C code, but it is really -*- C++ -*-
|
|---|
| 2 | //
|
|---|
| 3 | // Methode d'ajustement non-lineaire sur des objets
|
|---|
| 4 | // R. Ansari 02/2000
|
|---|
| 5 |
|
|---|
| 6 | #ifndef OBJFITTER_SEEN
|
|---|
| 7 | #define OBJFITTER_SEEN
|
|---|
| 8 |
|
|---|
| 9 | #include "machdefs.h"
|
|---|
| 10 |
|
|---|
| 11 | #include "tmatrix.h"
|
|---|
| 12 | #include "tvector.h"
|
|---|
| 13 | #include "generalfit.h"
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 | namespace SOPHYA {
|
|---|
| 17 |
|
|---|
| 18 | class ObjectFitter {
|
|---|
| 19 | public:
|
|---|
| 20 | // Residus et fonction fittees sur matrix
|
|---|
| 21 | static TMatrix<r_4> FitResidus(TMatrix<r_4> const & mtx, GeneralFit& gfit,
|
|---|
| 22 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 23 | static TMatrix<r_8> FitResidus(TMatrix<r_8> const & mtx, GeneralFit& gfit,
|
|---|
| 24 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 25 | static TMatrix<r_4> FitFunction(TMatrix<r_4> const & mtx, GeneralFit& gfit,
|
|---|
| 26 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 27 | static TMatrix<r_8> FitFunction(TMatrix<r_8> const & mtx, GeneralFit& gfit,
|
|---|
| 28 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 29 | // Residus et fonction fittees sur vecteurs
|
|---|
| 30 | static TVector<r_4> FitResidus(TVector<r_4> const & vec, GeneralFit& gfit,
|
|---|
| 31 | double xorg=0.,double dx=1.);
|
|---|
| 32 | static TVector<r_8> FitResidus(TVector<r_8> const & vec, GeneralFit& gfit,
|
|---|
| 33 | double xorg=0.,double dx=1.);
|
|---|
| 34 | static TVector<r_4> FitFunction(TVector<r_4> const & vec, GeneralFit& gfit,
|
|---|
| 35 | double xorg=0.,double dx=1.);
|
|---|
| 36 | static TVector<r_8> FitFunction(TVector<r_8> const & vec, GeneralFit& gfit,
|
|---|
| 37 | double xorg=0.,double dx=1.);
|
|---|
| 38 | };
|
|---|
| 39 |
|
|---|
| 40 | // Classe template pour ajustement sur tableaux (Vecteurs, Matrices)
|
|---|
| 41 | template <class T>
|
|---|
| 42 | class ArrayFitter {
|
|---|
| 43 | public:
|
|---|
| 44 |
|
|---|
| 45 | // Residus et fonction fittees sur matrix
|
|---|
| 46 | static TMatrix<T> FitResidus(TMatrix<T> const & mtx, GeneralFit& gfit,
|
|---|
| 47 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 48 | static TMatrix<T> FitFunction(TMatrix<T> const & mtx, GeneralFit& gfit,
|
|---|
| 49 | double xorg=0.,double yorg=0.,double dx=1.,double dy=1.);
|
|---|
| 50 |
|
|---|
| 51 | // Residus et fonction fittees sur vecteurs
|
|---|
| 52 | static TVector<T> FitResidus(TVector<T> const & vec, GeneralFit& gfit,
|
|---|
| 53 | double xorg=0.,double dx=1.);
|
|---|
| 54 | static TVector<T> FitFunction(TVector<T> const & vec, GeneralFit& gfit,
|
|---|
| 55 | double xorg=0.,double dx=1.);
|
|---|
| 56 |
|
|---|
| 57 | };
|
|---|
| 58 |
|
|---|
| 59 | } // Fin du namespace
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | #endif // OBJFITTER_SEEN
|
|---|