/////////////////////////////////////////////////////////////////////// // // All methods with optimisers derive from this // // Author: Phil G Jones // Author: Matthew Mottram -- contact person // // REVISION HISTORY: // 26/04/2011 : P G Jones - New file. // 02/05/2012 : P G Jones - New method-optimiser relationship. // 05/29/2013 : W J Heintzelman - Add GetFOM and SetFOM functions // 2013-10-26 : P G Jones - Change to use OptimisedComponent. // // Adds extra optimiser code, and forces definitions of setters // for optimised values. // /////////////////////////////////////////////////////////////////////// #ifndef __RAT_Method_OptimisedMethod_ #define __RAT_Method_OptimisedMethod_ #include #include #include namespace RAT { namespace Optimisers { class Optimiser; } namespace Methods { //Note virtual inheritance. class OptimisedMethod : public OptimisedComponent, public virtual Method { public: // Constructor OptimisedMethod() {} // Empty virtual destructor virtual ~OptimisedMethod() {} // To set a fit quality FOM // fomName is the name of FOM // value is the value to set void SetFOM( const std::string& fomName, const double value ) { fFitResult.SetFOM( fomName, value ); } // To retrieve a fit quality FOM // fomName name of FOM // Returns the FOM of the fit double GetFOM( const std::string& fomName ) { return fFitResult.GetFOM( fomName ); } // Converts the vector of params into the fFitResult // // Note that this method MUST be called before the error setting methods. // params is a vector of parameters to set virtual void SetParams( const std::vector& params ) = 0; // Converts the vector of errors into the fFitResult // errors is a vector of positive errors virtual void SetPositiveErrors( const std::vector& errors ) = 0; // Converts the vector of errors into the fFitResult // errors is a vector of negative errors virtual void SetNegativeErrors( const std::vector& errors ) = 0; }; } //::Method } //::RAT #endif