Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef PCL_POISSON_POLYNOMIAL_H_
00043 #define PCL_POISSON_POLYNOMIAL_H_
00044
00045 #include <vector>
00046
00047 namespace pcl {
00048 namespace poisson {
00049
00050 template<int Degree>
00051 class Polynomial{
00052 public:
00053 double coefficients[Degree+1];
00054
00055 Polynomial(void);
00056 template<int Degree2>
00057 Polynomial(const Polynomial<Degree2>& P);
00058 double operator() (const double& t) const;
00059 double integral (const double& tMin,const double& tMax) const;
00060
00061 int operator == (const Polynomial& p) const;
00062 int operator != (const Polynomial& p) const;
00063 int isZero(void) const;
00064 void setZero(void);
00065
00066 template<int Degree2>
00067 Polynomial& operator = (const Polynomial<Degree2> &p);
00068 Polynomial& operator += (const Polynomial& p);
00069 Polynomial& operator -= (const Polynomial& p);
00070 Polynomial operator - (void) const;
00071 Polynomial operator + (const Polynomial& p) const;
00072 Polynomial operator - (const Polynomial& p) const;
00073 template<int Degree2>
00074 Polynomial<Degree+Degree2> operator * (const Polynomial<Degree2>& p) const;
00075
00076 Polynomial& operator += (const double& s);
00077 Polynomial& operator -= (const double& s);
00078 Polynomial& operator *= (const double& s);
00079 Polynomial& operator /= (const double& s);
00080 Polynomial operator + (const double& s) const;
00081 Polynomial operator - (const double& s) const;
00082 Polynomial operator * (const double& s) const;
00083 Polynomial operator / (const double& s) const;
00084
00085 Polynomial scale (const double& s) const;
00086 Polynomial shift (const double& t) const;
00087
00088 Polynomial<Degree-1> derivative (void) const;
00089 Polynomial<Degree+1> integral (void) const;
00090
00091 void printnl (void) const;
00092
00093 Polynomial& addScaled (const Polynomial& p, const double& scale);
00094
00095 static void Negate (const Polynomial& in, Polynomial& out);
00096 static void Subtract (const Polynomial& p1, const Polynomial& p2, Polynomial& q);
00097 static void Scale (const Polynomial& p, const double& w, Polynomial& q);
00098 static void AddScaled (const Polynomial& p1, const double& w1, const Polynomial& p2, const double& w2, Polynomial& q);
00099 static void AddScaled (const Polynomial& p1, const Polynomial& p2, const double& w2, Polynomial& q);
00100 static void AddScaled (const Polynomial& p1, const double& w1, const Polynomial& p2, Polynomial& q);
00101
00102 void getSolutions (const double& c, std::vector<double>& roots, const double& EPS) const;
00103 };
00104
00105
00106 }
00107 }
00108
00109
00110 #include <pcl/surface/impl/poisson/polynomial.hpp>
00111 #endif