00001 // NLLSMinimizable.h: interface for the NLLSMinimizable class. 00002 // 00004 00005 #if !defined(AFX_NLLSMINIMIZABLE_H__C30960E1_4CA6_46E8_8BBA_3C586DCFD42D__INCLUDED_) 00006 #define AFX_NLLSMINIMIZABLE_H__C30960E1_4CA6_46E8_8BBA_3C586DCFD42D__INCLUDED_ 00007 00008 #if _MSC_VER > 1000 00009 #pragma once 00010 #endif // _MSC_VER > 1000 00011 00012 #include <cfloat> 00013 #include <cmath> 00014 #include "Minimizable.h" 00015 00016 class NLLSMinimizable : public Minimizable 00017 { 00018 public: 00019 NLLSMinimizable(); 00020 virtual ~NLLSMinimizable(); 00021 void Allocate(int nResiduals); 00022 double SumOfSquares(); 00023 virtual double ObjectiveFunction(double *parameters); 00024 virtual double ComputeResiduals(double *parameters) = 0; 00025 virtual double ComputeES(double *parameters, double T); 00026 virtual double EntropyShift(double T) = 0; 00027 virtual double F(double *parameters, double T) = 0; 00028 virtual double F0(double *parameters, double T) = 0; 00029 double *GetResiduals() {return residuals;} 00030 int GetNResiduals() {return nResiduals;} 00031 void SetNResiduals(int nResiduals) {this->nResiduals = nResiduals;} 00032 protected: 00033 double *residuals; 00034 int nResiduals; 00035 }; 00036 00037 #endif // !defined(AFX_NLLSMINIMIZABLE_H__C30960E1_4CA6_46E8_8BBA_3C586DCFD42D__INCLUDED_)