1 #ifndef CGENERALOBJECTIVE_H
2 #define CGENERALOBJECTIVE_H
29 std::string ParallelId;
31 double CalcMisfit(
const double measured,
const double predicted,
32 const double measerror,
const double errorlevel,
const int index);
54 SynthData = LocalSynthData;
109 #endif // CGENERALOBJECTIVE_H
ublas::vector< double > ttranscribed
virtual void SafeParallel(const ttranscribed &member)
The core performance calculation, has to be safe to be done in parallel.
double CalcPerformance(const ttranscribed &member)
For serial execution CalcPerformance calls the three Parallel functions for more convenient use...
GeneralObjective & operator=(const GeneralObjective &source)
void SetSynthData(const tdata &LocalSynthData)
virtual double PostParallel(const ttranscribed &member)=0
Some operations cannot be done in parallel, these are done after, returns the misfit value...
virtual ~GeneralObjective()
virtual void PreParallel(const ttranscribed &member)
Some operations cannot be done in parallel, these are done before.
virtual GeneralObjective * clone() const =0
We need clone and create for building an array of derived objects, see FAQ lite 20.8, the return type depends on the derived class.
int GetFitExponent()
Get the Fit exponent.
const tdata & GetSynthData()
Return the current synthetic data.
void SetMisfit(const tmisfit &LocalMisfit)
double CalcMisfit(const double measured, const double predicted, const double measerror, const double errorlevel, const int index)
void SetParallelID(const std::string &s)
We need to set the parallel ID outside the Objective function object.
const std::string & GetParallelID()
Derived classes need to read the ParallelId for their forward calculations.
double GetRMS()
Get the current RMS.
The basic object for any objective function, mainly an interface class and some storage.
ublas::vector< double > tmisfit
const tmisfit & GetMisfit()
Return the misfit vector.
tdata & SetSynthData()
Only derived classes can write access the Synthetic data.
tmisfit & SetMisfit()
Only derived classes can write access the Misfit.
ublas::vector< double > tdata
void SetRMS(const double x)
void SetFitExponent(const int x)
Set the Fit exponent.