00001 /* -*- mode: c++ -*- 00002 * 00003 * HippoPlot ConstantF class interface 00004 * 00005 * Copyright (C) 2000, 2003 The Board of Trustees of The Leland 00006 * Stanford Junior University. All Rights Reserved. 00007 * 00008 * $Id: ConstantF.h,v 1.31 2003/02/23 19:16:44 pfkeb Exp $ 00009 * 00010 */ 00011 00012 #ifndef _ConstantF_H_ 00013 #define _ConstantF_H_ 00014 00015 #include "FunctionBase.h" 00016 00027 class MDL_HIPPOPLOT_API ConstantF : public FunctionBase 00028 { 00029 protected: 00030 00032 virtual void initialize (); 00033 00034 public: 00035 00037 ConstantF (); 00038 00041 explicit ConstantF ( double value ); 00042 00043 virtual FunctionBase * clone () const; 00044 00046 virtual double operator () ( double x ) const; 00047 00048 virtual void initialParameters ( const FunctionHelper * helper ); 00049 00050 protected: 00051 00052 virtual double derivByParm ( int i, double x ) const; 00053 00054 }; 00055 00056 #endif // _ConstantF_H_