Changeset 3700
- Timestamp:
- 10/03/06 15:30:01
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
gnuradio/branches/releases/3.0/gnuradio-core/src/lib/general/gr_feval.cc
r3534 r3700 35 35 } 36 36 37 gr_feval_ff::~gr_feval_ff(){}38 39 float40 gr_feval_ff::eval(float x)41 {42 return 0;43 }44 45 37 gr_feval_cc::~gr_feval_cc(){} 46 38 … … 68 60 } 69 61 70 float71 gr_feval_ff_example(gr_feval_ff *f, float x)72 {73 return f->eval(x);74 }75 76 62 gr_complex 77 63 gr_feval_cc_example(gr_feval_cc *f, gr_complex x) gnuradio/branches/releases/3.0/gnuradio-core/src/lib/general/gr_feval.h
r3534 r3700 46 46 47 47 /*! 48 * \brief base class for evaluating a function: float -> float49 *50 * This class is designed to be subclassed in Python or C++51 * and is callable from both places. It uses SWIG's52 * "director" feature to implement the magic.53 * It's slow. Don't use it in a performance critical path.54 */55 class gr_feval_ff56 {57 public:58 gr_feval_ff() {}59 virtual ~gr_feval_ff();60 61 /*!62 * \brief override this to define the function63 */64 virtual float eval(float x);65 };66 67 /*!68 48 * \brief base class for evaluating a function: complex -> complex 69 49 * … … 109 89 */ 110 90 double gr_feval_dd_example(gr_feval_dd *f, double x); 111 float gr_feval_ff_example(gr_feval_ff *f, float x);112 91 gr_complex gr_feval_cc_example(gr_feval_cc *f, gr_complex x); 113 92 long gr_feval_ll_example(gr_feval_ll *f, long x);
