Last change
on this file since 3316 was 3141, checked in by cmv, 19 years ago |
chgt HProf->HistoErr + spectre 2D cmv 17/01/2007
|
File size:
1.3 KB
|
Rev | Line | |
---|
[3115] | 1 | #ifndef GENERICFUNC_H
|
---|
| 2 | #define GENERICFUNC_H
|
---|
| 3 |
|
---|
| 4 | #include "pexceptions.h"
|
---|
[3141] | 5 | #include <vector>
|
---|
[3115] | 6 |
|
---|
| 7 | namespace SOPHYA {
|
---|
| 8 |
|
---|
| 9 | //! Abstract interface definition for functions (double f(double)) viewed as classes
|
---|
| 10 | class GenericFunc {
|
---|
| 11 | public:
|
---|
| 12 | GenericFunc(void) { }
|
---|
| 13 | virtual ~GenericFunc(void) { }
|
---|
| 14 |
|
---|
| 15 | virtual double operator()(double x) {
|
---|
| 16 | cout<<"GenericFunc::operator(double) not implemented"<<endl;
|
---|
| 17 | throw NotAvailableOperation("GenericFunc::operator(double) not implemented");
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | virtual double operator()(double x,double y) {
|
---|
| 21 | cout<<"GenericFunc::operator(double,double) not implemented"<<endl;
|
---|
| 22 | throw NotAvailableOperation("GenericFunc::operator(double,double) not implemented");
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | virtual double operator()(double x,double y,double z) {
|
---|
| 26 | cout<<"GenericFunc::operator(double,double,double) not implemented"<<endl;
|
---|
| 27 | throw NotAvailableOperation("GenericFunc::operator(double,double,double) not implemented");
|
---|
| 28 | }
|
---|
| 29 |
|
---|
| 30 | virtual double operator()(double* x) {
|
---|
| 31 | cout<<"GenericFunc::operator(double*) not implemented"<<endl;
|
---|
| 32 | throw NotAvailableOperation("GenericFunc::operator(double*) not implemented");
|
---|
| 33 | }
|
---|
| 34 |
|
---|
[3141] | 35 | virtual double operator()(vector<double>& x) {
|
---|
| 36 | cout<<"GenericFunc::operator(vector<double>&) not implemented"<<endl;
|
---|
| 37 | throw NotAvailableOperation("GenericFunc::operator(vector<double>&) not implemented");
|
---|
| 38 | }
|
---|
| 39 |
|
---|
[3115] | 40 | };
|
---|
| 41 |
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.