Changeset 3098 in Sophya for trunk/SophyaLib/NTools/classfunc.h
- Timestamp:
- Nov 2, 2006, 3:32:37 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/classfunc.h
r2283 r3098 10 10 namespace SOPHYA { 11 11 12 // abstract class-function12 //! Abstract interface definition for functions (double f(double)) viewed as classes 13 13 class ClassFunc { 14 14 public: 15 virtual double operator()(double x) =0;15 virtual double operator()(double x) const =0; 16 16 }; 17 17 … … 22 22 public: 23 23 Function(double (*g)(double)):f(g){} 24 inline double operator()(double x){ return f(x);}24 virtual double operator()(double x) const { return f(x);} 25 25 }; 26 26
Note:
See TracChangeset
for help on using the changeset viewer.