16 #include "Fit/Minimizer/MinimizerResult.h"
17 #include "Fit/Tools/MinimizerUtils.h"
18 #include "Sim/Fitting/FitObjective.h"
19 #include "Sim/Fitting/IterationInfo.h"
20 #include "Sim/Fitting/SimDataPair.h"
24 , m_block_update_plots(false)
25 , m_update_interval(1)
44 info.
m_chi2 = subject->iterationInfo().chi2();
45 info.
m_iteration_count =
static_cast<int>(subject->iterationInfo().iterationCount());
46 info.
m_values = subject->iterationInfo().parameters().values();
48 if (subject->isCompleted())
49 info.
m_log_info = subject->minimizerResult().toString();
51 info.
m_sim_values = subject->dataPair().simulationResult().flatVector();
61 if (fitSuite->isInterrupted())
64 int n_iter =
static_cast<int>(fitSuite->iterationInfo().iterationCount());
66 || fitSuite->isCompleted();
73 return fitSuite->isCompleted();
Implements class GUIFitObserver.
The FitProgressInfo class contains all essential information about fit progress. It is send from GUIF...
std::vector< double > m_values
std::vector< double > m_sim_values
std::condition_variable m_on_finish_notifier
void setInterval(int val)
void finishedPlotting()
Informs observer that FitSuiteWidget has finished plotting and is ready for next plot.
bool is_suitable_iteration(const FitObjective *fitSuite) const
Returns true if data could be plotted, when there are resources for it.
bool is_obligatory_iteration(const FitObjective *fitSuite) const
Returns true if given iteration should be obligary plotted.
FitProgressInfo m_iteration_info
FitProgressInfo progressInfo()
GUIFitObserver(QObject *parent=nullptr)
bool m_block_update_plots
void update(const FitObjective *subject)
~GUIFitObserver() override
std::mutex m_update_plot_mutex