UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zd_real_func.hpp
1 /* zd_real_func.hpp */
2 /* $Id: zd_real_func.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 
4 /*
5  * $Log: zd_real_func.hpp,v $
6  * Revision 1.1 2007/04/14 00:33:34 vlad
7  * + ZdRealFunc
8  *
9  */
10 
11 #ifndef __zd_real_func_hpp
12 #define __zd_real_func_hpp
13 
14 #include "zd_f_vector.hpp"
15 
16 
21 class ZdRealFunc : public ZdFunction
22 {
23 public:
24 
26  ZdRealFunc (int n, double fArgStep = 1.0, double fArg0 = 0.0,
27  const char* szFuncName = NULL);
28 
30  ZdRealFunc (int n, const double* pArg,
31  const char* szFuncName = NULL);
32 
34  ZdRealFunc (ZdFunction& zdFunc,
35  const char* szFuncName = NULL);
36 
38  virtual ~ZdRealFunc ();
39 
40 
41  /*
42  * Run-time type identification facility
43  */
44 
46  virtual bool compatibleType (const char* szType) const;
47 
48 
49  /*
50  * Basic functionality
51  */
52 
54  virtual int count ();
55 
57  virtual double arg (int i);
58 
61  virtual double func (int i);
62 
63 
64  /*
65  * Extended functionality with default implementation
66  */
67 
70  virtual bool isNullAll ();
71 
74  virtual bool isNullFunc (int i);
75 
78  virtual double argStep ();
79 
83  virtual void getArgBounds (double b[2]);
84 
89  virtual void getFuncBounds (double b[2]);
90 
94  virtual int argIndex (double a);
95 
101  virtual double funcInterp (double a);
102 
103 
104  /*
105  * Additional functionality to change function
106  */
107 
109  virtual void setFunc (int i, double fNewValue);
110 
112  virtual void makeNullFunc (int i);
113 
115  virtual void makeNullAll ();
116 
117 protected:
118 
119  std::vector<double> m_vArg;
120  std::vector<double> m_vFunc;
121  std::vector<bool> m_vNull;
122 
123  ZdFVectorDouble *m_zdFunc;
124 
125  bool m_bUniformArgStep;
126  double m_fArgStep;
127 
128 private:
129 
131  static int s_iNameCounter;
132 
134  static const char *s_szOwnType;
135 
136 };
137 
138 
139 #endif /* zd_real_func.hpp */
virtual double funcInterp(double a)
virtual double func(int i)
virtual bool isNullAll()
virtual ~ZdRealFunc()
virtual void makeNullAll()
virtual bool compatibleType(const char *szType) const
Definition: zd_function.hpp:27
virtual int argIndex(double a)
virtual double argStep()
Definition: zd_real_func.hpp:21
virtual void setFunc(int i, double fNewValue)
virtual bool isNullFunc(int i)
virtual int count()
virtual void getArgBounds(double b[2])
virtual double arg(int i)
virtual void getFuncBounds(double b[2])
virtual void makeNullFunc(int i)
ZdRealFunc(int n, double fArgStep=1.0, double fArg0=0.0, const char *szFuncName=NULL)