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 #ifndef _PARAM0FUNCTIONINT_H
00034 #define _PARAM0FUNCTIONINT_H
00035
00036
00037 #include "ParamFunctionInt.h"
00038
00039
00040 namespace Go {
00043
00044
00045
00048
00049 class Param0FunctionInt : public ParamFunctionInt {
00050 public:
00053 explicit Param0FunctionInt(double C);
00054
00058 explicit Param0FunctionInt(double C,
00059 ParamFunctionInt *parent);
00060
00062 virtual ~Param0FunctionInt();
00063
00068 virtual void point(Point& res, const double *par) const;
00069
00081 virtual void point(std::vector<Point>& pt,
00082 const double* tpar,
00083 int derivs,
00084 const bool* from_right = 0,
00085 double resolution = 1.0e-12) const
00086 {
00087 DEBUG_ERROR_IF(derivs != 0,
00088 "Asked for derivatives of a standalone point.");
00089 pt.resize(1);
00090 point(pt[0], tpar);
00091 }
00092
00094 virtual Param0FunctionInt* getParam0FunctionInt();
00095
00097 virtual int numParams() const;
00098
00106 virtual void getLengthAndWiggle(double *length, double *wiggle);
00107
00112 virtual bool hasInnerKnots(int pardir) const;
00113
00118 virtual std::vector<double> getInnerKnotVals(int pardir,
00119 bool sort = false) const;
00120
00125 virtual bool hasCriticalVals(int pardir) const;
00126
00131 virtual std::vector<double> getCriticalVals(int pardir) const;
00132
00137 virtual bool hasCriticalValsOrKnots(int pardir) const;
00138
00143 virtual std::vector<double> getCriticalValsAndKnots(int pardir) const;
00144
00148 virtual bool canDivide(int pardir);
00149
00154 virtual int getMeshSize(int dir);
00155
00161 virtual double paramFromMesh(int dir, int idx);
00162
00164 virtual std::vector<double>::iterator getMesh();
00165
00169 virtual double startParam(int pardir) const;
00170
00174 virtual double endParam(int pardir) const;
00175
00181 virtual bool boundaryPoint(const double* par, double eps) const;
00182
00192 virtual void subdivide(int pardir, double par,
00193 std::vector<boost::
00194 shared_ptr<ParamFunctionInt> >& subdiv_objs,
00195 std::vector<boost::
00196 shared_ptr<ParamFunctionInt> >& bd_objs);
00197
00199 virtual CompositeBox compositeBox() const;
00200
00204
00205
00206
00207 virtual bool monotone(Point& dir, double tol=1.0e-15) const;
00208
00211 virtual void
00212 getBoundaryObjects(std::vector<boost::
00213 shared_ptr<BoundaryFunctionInt> >& bd_objs);
00214
00216 int dimension();
00217
00218
00219
00220
00221
00222
00228 virtual int knotIntervalFuzzy(double& t, double tol) const;
00229
00234 virtual double nextSegmentVal(double par, bool forward) const;
00235
00237 double getValue() const
00238 { return C_; }
00239
00240 protected:
00241
00242 double C_;
00243
00244 int dim_;
00245
00246 ParamFunctionInt* parentcurve_;
00247
00248 };
00249
00250
00252 }
00253
00254
00255 #endif // _PARAM0FUNCTIONINT_H
00256
00257