00001 /* -*- mode: c++ -*- */ 00002 00013 #ifndef _PowerLaw_H_ 00014 #define _PowerLaw_H_ 00015 00016 #include "FunctionBase.h" 00017 00018 namespace hippodraw { 00019 00025 class MDL_HIPPOPLOT_API PowerLaw : public FunctionBase 00026 { 00027 00028 protected: 00029 00031 virtual void initialize (); 00032 00033 public: 00034 00036 PowerLaw (); 00037 00039 PowerLaw ( double prefactor, double index ); 00040 00041 virtual FunctionBase * clone () const; 00042 00044 virtual double operator () ( double x ) const; 00045 00046 virtual void initialParameters ( const FunctionHelper * helper ); 00047 00048 protected: 00049 00050 virtual double derivByParm ( int i, double x ) const; 00051 00052 }; 00053 00054 } // namespace hippodraw 00055 00056 #endif // _PowerLaw_H_