|
BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Contains status of the fitting (running, interupted etc) and all intermediate information which has to be collected during the fit. More...
Public Member Functions | |
| FitStatus (const FitObjective *fit_objective) | |
| ~FitStatus () | |
| void | addObserver (int every_nth, fit_observer_t) |
| void | finalize (const mumufit::MinimizerResult &result) |
| Should be explicitely called on last iteration to notify all observers. More... | |
| void | initPrint (int every_nth) |
| bool | isCompleted () const |
| bool | isInterrupted () const |
| IterationInfo | iterationInfo () const |
| mumufit::MinimizerResult | minimizerResult () const |
| void | setInterrupted () |
| void | update (const mumufit::Parameters ¶ms, double chi2) |
Private Types | |
| enum | EFitStatus { IDLE , RUNNING , COMPLETED , FAILED , INTERRUPTED } |
Private Attributes | |
| const FitObjective * | m_fit_objective |
| EFitStatus | m_fit_status |
| IterationInfo | m_iterationInfo |
| std::unique_ptr< mumufit::MinimizerResult > | m_minimizer_result |
| FitObserver< FitObjective > | m_observers |
| std::unique_ptr< FitPrintService > | m_print_service |
Contains status of the fitting (running, interupted etc) and all intermediate information which has to be collected during the fit.
Owned by FitObjective.
Definition at line 38 of file FitStatus.h.
|
private |
| FitStatus::FitStatus | ( | const FitObjective * | fit_objective | ) |
Definition at line 20 of file FitStatus.cpp.
|
default |
| void FitStatus::addObserver | ( | int | every_nth, |
| fit_observer_t | observer | ||
| ) |
Definition at line 63 of file FitStatus.cpp.
References FitObserver< T >::addObserver(), and m_observers.
Referenced by initPrint().
| void FitStatus::finalize | ( | const mumufit::MinimizerResult & | result | ) |
Should be explicitely called on last iteration to notify all observers.
Definition at line 82 of file FitStatus.cpp.
References COMPLETED, m_fit_objective, m_fit_status, m_minimizer_result, m_observers, and FitObserver< T >::notify_all().
| void FitStatus::initPrint | ( | int | every_nth | ) |
Definition at line 52 of file FitStatus.cpp.
References addObserver(), and m_print_service.
| bool FitStatus::isCompleted | ( | ) | const |
Definition at line 37 of file FitStatus.cpp.
References COMPLETED, and m_fit_status.
| bool FitStatus::isInterrupted | ( | ) | const |
Definition at line 32 of file FitStatus.cpp.
References INTERRUPTED, and m_fit_status.
Referenced by update().
| IterationInfo FitStatus::iterationInfo | ( | ) | const |
| mumufit::MinimizerResult FitStatus::minimizerResult | ( | ) | const |
| void FitStatus::setInterrupted | ( | ) |
Definition at line 27 of file FitStatus.cpp.
References INTERRUPTED, and m_fit_status.
| void FitStatus::update | ( | const mumufit::Parameters & | params, |
| double | chi2 | ||
| ) |
Definition at line 42 of file FitStatus.cpp.
References isInterrupted(), m_fit_objective, m_fit_status, m_iterationInfo, m_observers, FitObserver< T >::notify(), RUNNING, and IterationInfo::update().
|
private |
Definition at line 65 of file FitStatus.h.
Referenced by finalize(), and update().
|
private |
Definition at line 62 of file FitStatus.h.
Referenced by finalize(), isCompleted(), isInterrupted(), setInterrupted(), and update().
|
private |
Definition at line 66 of file FitStatus.h.
Referenced by iterationInfo(), and update().
|
private |
Definition at line 67 of file FitStatus.h.
Referenced by finalize(), and minimizerResult().
|
private |
Definition at line 63 of file FitStatus.h.
Referenced by addObserver(), finalize(), and update().
|
private |
Definition at line 64 of file FitStatus.h.
Referenced by initPrint().