#include <GeneralObjective.h>

Public Member Functions | |
| void | SetFitExponent (const int x) |
| Set the Fit exponent. | |
| int | GetFitExponent () |
| Get the Fit exponent. | |
| double | GetRMS () |
| Get the current RMS. | |
| const std::string & | GetParallelID () |
| Derived classes need to read the ParallelId for their forward calculations. | |
| void | SetParallelID (const std::string &s) |
| We need to set the parallel ID outside the Objective function object. | |
| const tmisfit & | GetMisfit () |
| Return the misfit vector. | |
| const tdata & | GetSynthData () |
| Return the current synthetic data. | |
| 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. | |
| virtual void | PreParallel (const ttranscribed &member) |
| Some operations cannot be done in parallel, these are done before. | |
| virtual double | PostParallel (const ttranscribed &member)=0 |
| Some operations cannot be done in parallel, these are done after, returns the misfit value. | |
| 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 () | |
| GeneralObjective (const GeneralObjective &Old) | |
| GeneralObjective & | operator= (const GeneralObjective &source) |
| virtual | ~GeneralObjective () |
Protected Member Functions | |
| double | CalcMisfit (const double measured, const double predicted, const double measerror, const double errorlevel, const int index) |
| void | SetRMS (const double x) |
| tmisfit & | SetMisfit () |
| Only derived classes can write access the Misfit. | |
| void | SetMisfit (const tmisfit &LocalMisfit) |
| tdata & | SetSynthData () |
| Only derived classes can write access the Synthetic data. | |
| void | SetSynthData (const tdata &LocalSynthData) |
All objective functions should be derived from this class to be usable with the genetic algorithms. Also the linearized classes use this base class to access objective functions. The main functionality is implemented in the three functions PreParallel, SafeParallel and PostParallel. This division is ncessary to account for various types of computations in a parallel environment. In addition derived classes have to implement the clone function and a copy constructor and operator.
Definition at line 13 of file GeneralObjective.h.
| GeneralObjective::GeneralObjective | ( | ) |
Definition at line 5 of file GeneralObjective.cpp.
| GeneralObjective::GeneralObjective | ( | const GeneralObjective & | Old | ) |
Definition at line 14 of file GeneralObjective.cpp.
| GeneralObjective::~GeneralObjective | ( | ) | [virtual] |
Definition at line 10 of file GeneralObjective.cpp.
| double GeneralObjective::CalcMisfit | ( | const double | measured, | |
| const double | predicted, | |||
| const double | measerror, | |||
| const double | errorlevel, | |||
| const int | index | |||
| ) | [protected] |
Definition at line 50 of file GeneralObjective.cpp.
References GetFitExponent(), SetMisfit(), and SetSynthData().
Referenced by C1DRecObjective::PostParallel(), AbsVelRecObjective::PostParallel(), SurfaceWaveObjective::SafeParallel(), PTensor1DMTObjective::SafeParallel(), C1DMTObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
| double GeneralObjective::CalcPerformance | ( | const ttranscribed & | member | ) |
For serial execution CalcPerformance calls the three Parallel functions for more convenient use.
Definition at line 43 of file GeneralObjective.cpp.
References PostParallel(), PreParallel(), and SafeParallel().
Referenced by CalcGradient(), CalcPartialDerivs(), init(), main(), misfit(), and MTRecObjective::PostParallel().
| virtual GeneralObjective* GeneralObjective::clone | ( | ) | const [pure virtual] |
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.
Implemented in AbsVelRecObjective, Aniso1DMTObjective, C1DRecObjective, CombinedRoughness, Iso1DMTObjective, MTAnisoRoughness, MTRecObjective, MTRoughness, Multi1DRecObjective, PTensor1DMTObjective, SeismicModelDiff, AnisoSurfaceWaveObjective, MultiAnisoSurfaceWaveObjective, SurfaceWaveObjective, SWAnisoRoughness, TestObjective, and TestObjective2.
| int GeneralObjective::GetFitExponent | ( | ) | [inline] |
Get the Fit exponent.
Definition at line 59 of file GeneralObjective.h.
Referenced by CalcMisfit(), C1DRecObjective::PostParallel(), AbsVelRecObjective::PostParallel(), SWAnisoRoughness::SafeParallel(), SurfaceWaveObjective::SafeParallel(), PTensor1DMTObjective::SafeParallel(), MTRoughness::SafeParallel(), MTAnisoRoughness::SafeParallel(), CombinedRoughness::SafeParallel(), C1DMTObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
| const tmisfit& GeneralObjective::GetMisfit | ( | ) | [inline] |
Return the misfit vector.
Definition at line 79 of file GeneralObjective.h.
Referenced by misfit(), MTRecObjective::PostParallel(), and AbsVelRecObjective::PostParallel().
| const std::string& GeneralObjective::GetParallelID | ( | ) | [inline] |
Derived classes need to read the ParallelId for their forward calculations.
Definition at line 69 of file GeneralObjective.h.
Referenced by Multi1DRecObjective::PostParallel(), C1DRecObjective::PostParallel(), SurfaceWaveObjective::PreParallel(), MultiAnisoSurfaceWaveObjective::PreParallel(), Multi1DRecObjective::PreParallel(), C1DRecObjective::PreParallel(), AnisoSurfaceWaveObjective::PreParallel(), SurfaceWaveObjective::SafeParallel(), Multi1DRecObjective::SafeParallel(), C1DRecObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
| double GeneralObjective::GetRMS | ( | ) | [inline] |
Get the current RMS.
Definition at line 64 of file GeneralObjective.h.
Referenced by SWAnisoRoughness::PostParallel(), SurfaceWaveObjective::PostParallel(), SeismicModelDiff::PostParallel(), PTensor1DMTObjective::PostParallel(), MTRoughness::PostParallel(), MTAnisoRoughness::PostParallel(), CombinedRoughness::PostParallel(), C1DRecObjective::PostParallel(), C1DMTObjective::PostParallel(), AnisoSurfaceWaveObjective::PostParallel(), and AbsVelRecObjective::PostParallel().
| const tdata& GeneralObjective::GetSynthData | ( | ) | [inline] |
Return the current synthetic data.
Definition at line 84 of file GeneralObjective.h.
Referenced by CalcPartialDerivs(), main(), MTRecObjective::PostParallel(), and AbsVelRecObjective::PostParallel().
| GeneralObjective & GeneralObjective::operator= | ( | const GeneralObjective & | source | ) |
Definition at line 20 of file GeneralObjective.cpp.
References FitExponent, Misfit, ParallelId, RMS, and SynthData.
| virtual double GeneralObjective::PostParallel | ( | const ttranscribed & | member | ) | [pure virtual] |
Some operations cannot be done in parallel, these are done after, returns the misfit value.
Implemented in AbsVelRecObjective, C1DMTObjective, C1DRecObjective, CombinedRoughness, MTAnisoRoughness, MTRecObjective, MTRoughness, Multi1DRecObjective, PTensor1DMTObjective, SeismicModelDiff, AnisoSurfaceWaveObjective, MultiAnisoSurfaceWaveObjective, SurfaceWaveObjective, SWAnisoRoughness, TestObjective, and TestObjective2.
Referenced by CalcPerformance().
| void GeneralObjective::PreParallel | ( | const ttranscribed & | member | ) | [virtual] |
Some operations cannot be done in parallel, these are done before.
Reimplemented in C1DRecObjective, Multi1DRecObjective, AnisoSurfaceWaveObjective, MultiAnisoSurfaceWaveObjective, and SurfaceWaveObjective.
Definition at line 33 of file GeneralObjective.cpp.
Referenced by CalcPerformance().
| void GeneralObjective::SafeParallel | ( | const ttranscribed & | member | ) | [virtual] |
The core performance calculation, has to be safe to be done in parallel.
Reimplemented in C1DMTObjective, C1DRecObjective, CombinedRoughness, MTAnisoRoughness, MTRoughness, Multi1DRecObjective, PTensor1DMTObjective, SeismicModelDiff, AnisoSurfaceWaveObjective, MultiAnisoSurfaceWaveObjective, SurfaceWaveObjective, and SWAnisoRoughness.
Definition at line 38 of file GeneralObjective.cpp.
Referenced by CalcPerformance().
| void GeneralObjective::SetFitExponent | ( | const int | x | ) | [inline] |
| void GeneralObjective::SetMisfit | ( | const tmisfit & | LocalMisfit | ) | [inline, protected] |
Definition at line 38 of file GeneralObjective.h.
| tmisfit& GeneralObjective::SetMisfit | ( | ) | [inline, protected] |
Only derived classes can write access the Misfit.
Definition at line 34 of file GeneralObjective.h.
Referenced by CalcMisfit(), MTRecObjective::PostParallel(), C1DRecObjective::PostParallel(), AbsVelRecObjective::PostParallel(), SurfaceWaveObjective::SafeParallel(), PTensor1DMTObjective::SafeParallel(), C1DMTObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
| void GeneralObjective::SetParallelID | ( | const std::string & | s | ) | [inline] |
We need to set the parallel ID outside the Objective function object.
Definition at line 74 of file GeneralObjective.h.
| void GeneralObjective::SetRMS | ( | const double | x | ) | [inline, protected] |
Definition at line 29 of file GeneralObjective.h.
Referenced by MTRecObjective::PostParallel(), C1DRecObjective::PostParallel(), AbsVelRecObjective::PostParallel(), SWAnisoRoughness::SafeParallel(), SurfaceWaveObjective::SafeParallel(), SeismicModelDiff::SafeParallel(), PTensor1DMTObjective::SafeParallel(), MTRoughness::SafeParallel(), MTAnisoRoughness::SafeParallel(), CombinedRoughness::SafeParallel(), C1DMTObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
| void GeneralObjective::SetSynthData | ( | const tdata & | LocalSynthData | ) | [inline, protected] |
Definition at line 48 of file GeneralObjective.h.
| tdata& GeneralObjective::SetSynthData | ( | ) | [inline, protected] |
Only derived classes can write access the Synthetic data.
Definition at line 43 of file GeneralObjective.h.
Referenced by CalcMisfit(), MTRecObjective::PostParallel(), C1DRecObjective::PostParallel(), AbsVelRecObjective::PostParallel(), SurfaceWaveObjective::SafeParallel(), PTensor1DMTObjective::SafeParallel(), C1DMTObjective::SafeParallel(), and AnisoSurfaceWaveObjective::SafeParallel().
1.5.8