C++ main module for emicrom Package  1.0
MATH_P4.h
Go to the documentation of this file.
1 #ifndef MATH_P4_H
2 #define MATH_P4_H
3 
4 #include "MATH_P3.h"
5 
14 
15 class MATH_P4 : public MATH_P3 {
16 
17 
19 
20  // ATTRIBUTES
21 
22 
23 
24 private:
25 
26 
27 
28 public:
29  // METHODS
30 
31  // CONSTRUCTORS
32 
35  MATH_P4(void):MATH_P3(4) {
36  }
37 
38 protected:
42  MATH_P4(const tUIndex& n):MATH_P3(n) {
43  }
44 
45 public:
46 
47 
48  // DESTRUCTORS
49 
50 
53  virtual ~MATH_P4(void) {
54  }
55 
56 
57 public:
58 
59  // CONSTRUCTORS
60 
63  inline static SP::MATH_P4 New() {
64  SP::MATH_P4 ret(new MATH_P4(),
65  MATH_P4::Delete());
66  ret->setThis(ret);
67  return ret;
68  };
73  inline static SP::MATH_P4 New(const tReal a[]) {
74  SP::MATH_P4 p=New();
75  p->setCoefficients(a);
76  return p;
77  };
78 
79 
80 
81 public:
82 
83 
84 
85 
86  // GET methods
87 
88 
89 
90 public:
91  // OTHERS methods
92 
93 
94 
104  virtual tUInteger solve(tReal x[]) const;
105 
106 
107 
111  tReal computeFirstExtrenum() const;
112 
113 
114 private:
124  static tReal NewtonStep(const tReal &a0,
125  const tReal &a1,
126  const tReal &a2,
127  const tReal &a3,
128  const tReal& a4,
129  const tReal& x0);
142  tUInteger solveP4De(const tReal &a0,
143  const tReal &a1,
144  const tReal &a2,
145  tReal x[]) const;
146 
158  tUInteger solveP4Bi(const tReal &a0,
159  const tReal &a2,
160  tReal x[]) const;
161 
162 };
163 
164 #endif
tReal computeFirstExtrenum() const
solve the first optimal value
Definition: MATH_P4.cpp:207
virtual ~MATH_P4(void)
destroy
Definition: MATH_P4.h:53
#define tUInteger
Definition: types.h:91
This class describes a polynom of degre 3 : .
Definition: MATH_P3.h:16
tUInteger solveP4De(const tReal &a0, const tReal &a1, const tReal &a2, tReal x[]) const
solve the equation P(x)=0.
Definition: MATH_P4.cpp:103
static SP::MATH_P4 New(const tReal a[])
builds a Polynome of 4-degree with coefficients
Definition: MATH_P4.h:73
tUInteger solveP4Bi(const tReal &a0, const tReal &a2, tReal x[]) const
solve the equation P(x)=0.
Definition: MATH_P4.cpp:61
MATH_P4(void)
create a polynom of degree 4
Definition: MATH_P4.h:35
#define tUIndex
Definition: types.h:126
virtual tUInteger solve(tReal x[]) const
solve the equation P(x)=0.
Definition: MATH_P4.cpp:15
DEFINE_SPTR(MATH_P4)
static tReal NewtonStep(const tReal &a0, const tReal &a1, const tReal &a2, const tReal &a3, const tReal &a4, const tReal &x0)
return the intersection point of the tangential of the polynom at x with the x-axis of the polynome ...
Definition: MATH_P4.cpp:5
SP_OBJECT(MATH_P4)
static SP::MATH_P4 New()
builds a Polynome of 4-degree
Definition: MATH_P4.h:63
#define tReal
Definition: types.h:118
MATH_P4(const tUIndex &n)
create of degree n
Definition: MATH_P4.h:42
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
This class describes a polynom of degre 4 .
Definition: MATH_P4.h:15