Developer documentation

cell_uv_bernstein.hpp
Go to the documentation of this file.
1 /*****************************************************************************
2  * M a t h e m a g i x
3  *****************************************************************************
4  * cell for univariate bernstein equation
5  * 2008-05-16
6  *****************************************************************************
7  * Copyright (C) 2010 INRIA Sophia-Antipolis
8  *****************************************************************************
9  * Comments :
10  ****************************************************************************/
11 # ifndef realroot_cell_bernstein_hpp
12 # define realroot_cell_bernstein_hpp
13 
14 # include <realroot/Seq.hpp>
16 # include <realroot/Interval.hpp>
19 
20 # undef C
21 # define TMPL template<typename C>
22 # define SELF cell_uv_bernstein<C>
23 
24 //====================================================================
25 namespace mmx {
26 
27 
28 TMPL
30 
31 public:
32 
33  typedef C Scalar;
35 
36  cell_uv_bernstein(void) ;
37  cell_uv_bernstein(const Polynomial& E): m_equs(E), m_doms(Interval<C>(0,1)) {}
38  cell_uv_bernstein(const Polynomial& E, const Interval<double>& D): m_equs(E), m_doms(D) {}
39 
40  template<class POL>
41  cell_uv_bernstein(const POL& E, const Interval<double>& D) : m_doms(D) {
42  let::assign(m_equs,E,D);
43  }
44 
45  ~cell_uv_bernstein(void) ;
46 
47  Polynomial equation() const {return m_equs;}
48  Polynomial& equation() {return m_equs;}
49 
50  Interval<double> domain() const {return m_doms;}
51  Interval<double> & domain() {return m_doms;}
52 
53  C size(void) const { return m_doms.size(); }
54 
55 private:
56  Polynomial m_equs;
57  Interval<double> m_doms;
58 };
59 
60 //--------------------------------------------------------------------
61 TMPL
62 SELF::cell_uv_bernstein(void) {}
63 
64 TMPL
65 SELF::~cell_uv_bernstein(void) {}
66 
67 //====================================================================
68 } // namespace mmx
69 //====================================================================
70 # undef TMPL
71 # undef SELF
72 # endif
Interval< double > domain() const
Definition: cell_uv_bernstein.hpp:50
#define TMPL
Definition: cell_uv_bernstein.hpp:21
Interval< double > & domain()
Definition: cell_uv_bernstein.hpp:51
C size(void) const
Definition: cell_uv_bernstein.hpp:53
cell_uv_bernstein(const Polynomial &E, const Interval< double > &D)
Definition: cell_uv_bernstein.hpp:38
cell_uv_bernstein(const Polynomial &E)
Definition: cell_uv_bernstein.hpp:37
Definition: polynomial.hpp:37
TMPL POL
Definition: polynomial_dual.hpp:74
Definition: cell_uv_bernstein.hpp:29
cell_uv_bernstein(const POL &E, const Interval< double > &D)
Definition: cell_uv_bernstein.hpp:41
T size() const
same as width
Definition: Interval.hpp:127
C Scalar
Definition: cell_uv_bernstein.hpp:33
Generic class for intervals.
Definition: Interval.hpp:44
Polynomial equation() const
Definition: cell_uv_bernstein.hpp:47
double C
Definition: solver_mv_fatarcs.cpp:16
Polynomial & equation()
Definition: cell_uv_bernstein.hpp:48
void assign(A &a, const B &b)
Generic definition of the assignement function.
Definition: assign.hpp:97
Definition: array.hpp:12
polynomial< C, with< Bernstein > > Polynomial
Definition: cell_uv_bernstein.hpp:34
Home