00001 // QMcBeaver 00002 // 00003 // Constructed by 00004 // 00005 // Michael Todd Feldmann 00006 // and 00007 // David Randall "Chip" Kent IV 00008 // 00009 // Copyright 2000. All rights reserved. 00010 // 00011 // drkent@users.sourceforge.net mtfeldmann@users.sourceforge.net 00012 00013 #ifndef QMCObjectiveFunction_H 00014 #define QMCObjectiveFunction_H 00015 00016 #include <iostream> 00017 #include <string> 00018 00019 #include "Array1D.h" 00020 #include "Array2D.h" 00021 #include "QMCObjectiveFunctionResult.h" 00022 #include "QMCProperties.h" 00023 #include "QMCReadAndEvaluateConfigs.h" 00024 00025 using namespace std; 00026 00035 class QMCObjectiveFunction 00036 { 00037 public: 00044 void initialize(QMCInput *input, int configsToSkip); 00045 00054 QMCObjectiveFunctionResult evaluate(Array1D<double> ¶ms); 00055 00065 Array1D< QMCObjectiveFunctionResult > evaluate(Array1D< Array1D<double> > & 00066 params); 00067 00076 Array1D<double> grad(Array1D<double> & params); 00077 00087 Array1D< Array1D<double> > grad(Array1D< Array1D<double> > & params); 00088 00089 private: 00090 QMCInput *Input; 00091 00092 QMCReadAndEvaluateConfigs RAEC; 00093 00094 void numerical_grad(Array1D<double> & Params, Array1D<double> & GRAD); 00095 }; 00096 00097 #endif