00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 # ifndef shape_semialgebraic_domain_hpp
00014 # define shape_semialgebraic_domain_hpp
00015
00016 # include <realroot/GMP.hpp>
00017 # include <shape/algebraic_curve.hpp>
00018 # include <shape/surface.hpp>
00019 # define TMPL template<class C, class V>
00020 # define REF REF_OF(V)
00021 # define SELF semialgebraic_curve<C,V>
00022
00023 namespace mmx {
00024 namespace shape {
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 template<class C, class V=default_env>
00037 class semialgebraic_curve : public algebraic_curve<C,V> {
00038
00039 public:
00040 typedef typename SHAPE_OF(V) Shape;
00041 typedef algebraic_curve<C,REF> AlgebraicCurve;
00042 typedef typename AlgebraicCurve::Polynomial Polynomial;
00043
00044 semialgebraic_curve(void) {} ;
00045 semialgebraic_curve(char *, int=1) ;
00046 semialgebraic_curve(const Polynomial &, int=1) ;
00047 semialgebraic_curve(AlgebraicCurve*, int=1) ;
00048 ~semialgebraic_curve(void) {};
00049
00050 Polynomial inequality() const { return this->equation() ; }
00051
00052
00053
00054 private:
00055
00056
00057 } ;
00058
00059 TMPL
00060 SELF::semialgebraic_curve(char * s, int i)
00061 : AlgebraicCurve(s) {
00062 if (i<0) this->set_equation( this->equation()*(-1));
00063 }
00064
00065 TMPL
00066 SELF::semialgebraic_curve(const Polynomial& p, int s)
00067 : AlgebraicCurve(p) { if (s<0) this->set_equation((-1)*p); }
00068
00069 TMPL
00070 SELF::semialgebraic_curve(AlgebraicCurve* c, int s)
00071 : AlgebraicCurve(c) { if (s<0) this->set_equation((-1)*c->equation()); }
00072
00073 } ;
00074 } ;
00075
00076 # undef TMPL
00077 # undef REF
00078 # undef SELF
00079 # endif // shape_semialgebraic_curve_hpp