OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Equation.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // "Copyright Centre National d'Etudes Spatiales"
4 //
5 // License: LGPL
6 //
7 // See LICENSE.txt file in the top level directory for more details.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #ifndef Equation_h
13 #define Equation_h
14 
15 #include <complex>
16 #include <vector>
18 
19 namespace ossimplugins
20 {
21 
22 
27 {
28 public:
32  Equation();
36  ~Equation();
37 
38  Equation(const Equation& rhs);
39 
40  Equation& operator=(const Equation& rhs);
41 
42  Equation(int degree, std::complex<double>* coefficients);
43 
44  void CreateEquation(int degree, std::complex<double>* coefficients);
45 
46  void Solve();
47 
48  int get_nbrSol() const
49  {
50  return _nbrSol;
51  };
52 
53  const std::complex<double>* get_solutions() const
54  {
55  return _solutions;
56  };
57 
58  std::vector<int> get_order() const
59  {
60  return _order;
61  };
62 
63 protected:
64 
68  std::complex<double>* _coefficients;
72  int _degree;
73 
74  void ComputeTrueDegree();
75 
76  void Normalisation();
77  void DeNormalisation();
78  static const double Epsilon;
79 
80  int _nbrSol;
81  std::vector<int> _order;
82  std::complex<double>* _solutions;
83 private:
84 
86  {
88  SmallValues
89  };
90 
94 
95  void Solve1();
96  void Solve2();
97  void Solve3(int d4 =0);
98  void Solve4();
99 
103  std::complex<double> Proche(std::complex<double> z, double epsilon);
104 
108  int TestDegree3Triple(std::complex<double>* a, double epsilon);
112  int TestDegree3SimpleDouble(std::complex<double>* a, double epsilon);
113 
117  int IndiceMin ( int n , double *list);
118 
122  int IndiceMax ( int n , double *list);
123 
127  int TestDegree4Quad ( std::complex<double> *a , double epsilon );
131  int TestDegree4DoubleDouble ( std::complex<double> *a , std::complex<double> *k , double epsilon );
135  int TestDegree4SimpleTriple ( std::complex<double> *a , std::complex<double> *k , double epsilon );
139  int TestDegreeSimpleSimpleDouble( std::complex<double> *a , double epsilon );
140  ;
141 };
142 }
143 
144 #endif
int _degree
Equation degree.
Definition: Equation.h:72
std::vector< int > _order
Definition: Equation.h:81
os2<< "> n<< " > nendobj n
std::vector< int > get_order() const
Definition: Equation.h:58
int get_nbrSol() const
Definition: Equation.h:48
double _normalisationCoefficient
Definition: Equation.h:92
#define OSSIM_PLUGINS_DLL
This class manages and solves an equation of the fourth degree.
Definition: Equation.h:26
NormalisationType _normalisationType
Definition: Equation.h:91
static const double Epsilon
Definition: Equation.h:78
std::complex< double > * _solutions
Definition: Equation.h:82
const std::complex< double > * get_solutions() const
Definition: Equation.h:53