realroot_doc 0.1.1
/Users/mourrain/Devel/mmx/realroot/include/realroot/cell_uv_bernstein.hpp
Go to the documentation of this file.
00001 /*****************************************************************************
00002  * M a t h e m a g i x
00003  *****************************************************************************
00004  * cell for univariate bernstein equation
00005  * 2008-05-16
00006  *****************************************************************************
00007  *               Copyright (C) 2010 INRIA Sophia-Antipolis
00008  *****************************************************************************
00009  * Comments :
00010  ****************************************************************************/
00011 # ifndef realroot_cell_bernstein_hpp
00012 # define realroot_cell_bernstein_hpp
00013 
00014 # include <realroot/Seq.hpp>
00015 # include <realroot/sign_variation.hpp>
00016 # include <realroot/Interval.hpp>
00017 # include <realroot/polynomial_bernstein.hpp>
00018 # include <realroot/polynomial_sparse.hpp>
00019 
00020 # undef C
00021 # define TMPL template<typename C>
00022 # define SELF cell_uv_bernstein<C>
00023 
00024 //====================================================================
00025 namespace mmx {
00026 
00027  
00028 TMPL 
00029 class cell_uv_bernstein {
00030   
00031 public:
00032 
00033   typedef C Scalar;
00034   typedef polynomial<C, with<Bernstein> > Polynomial;
00035 
00036   cell_uv_bernstein(void) ;
00037   cell_uv_bernstein(const Polynomial& E): m_equs(E), m_doms(Interval<C>(0,1)) {}
00038   cell_uv_bernstein(const Polynomial& E, const Interval<double>& D): m_equs(E), m_doms(D) {}
00039 
00040   template<class POL>
00041   cell_uv_bernstein(const POL& E, const Interval<double>& D) : m_doms(D) {
00042     let::assign(m_equs,E,D);
00043   }
00044 
00045   ~cell_uv_bernstein(void) ;
00046 
00047   Polynomial  equation() const {return m_equs;}
00048   Polynomial& equation()       {return m_equs;}
00049 
00050   Interval<double>   domain() const {return m_doms;}
00051   Interval<double> & domain()       {return m_doms;}
00052 
00053   C size(void) const { return m_doms.size(); }
00054 
00055 private:
00056   Polynomial         m_equs;
00057   Interval<double>   m_doms;
00058 };
00059 
00060 //--------------------------------------------------------------------
00061 TMPL
00062 SELF::cell_uv_bernstein(void)  {}
00063 
00064 TMPL
00065 SELF::~cell_uv_bernstein(void) {}
00066 
00067 //====================================================================
00068 } // namespace mmx
00069 //====================================================================
00070 # undef TMPL
00071 # undef SELF
00072 # endif