return 0;
}
-gr_feval_ff::~gr_feval_ff(){}
-
-float
-gr_feval_ff::eval(float x)
-{
- return 0;
-}
-
gr_feval_cc::~gr_feval_cc(){}
gr_complex
return f->eval(x);
}
-float
-gr_feval_ff_example(gr_feval_ff *f, float x)
-{
- return f->eval(x);
-}
-
gr_complex
gr_feval_cc_example(gr_feval_cc *f, gr_complex x)
{
virtual double eval(double x);
};
-/*!
- * \brief base class for evaluating a function: float -> float
- *
- * This class is designed to be subclassed in Python or C++
- * and is callable from both places. It uses SWIG's
- * "director" feature to implement the magic.
- * It's slow. Don't use it in a performance critical path.
- */
-class gr_feval_ff
-{
-public:
- gr_feval_ff() {}
- virtual ~gr_feval_ff();
-
- /*!
- * \brief override this to define the function
- */
- virtual float eval(float x);
-};
-
/*!
* \brief base class for evaluating a function: complex -> complex
*
* \brief trivial examples / test cases showing C++ calling Python code
*/
double gr_feval_dd_example(gr_feval_dd *f, double x);
-float gr_feval_ff_example(gr_feval_ff *f, float x);
gr_complex gr_feval_cc_example(gr_feval_cc *f, gr_complex x);
long gr_feval_ll_example(gr_feval_ll *f, long x);