23 const int column_width = 18;
25 template <
typename T> std::string reportValue(
const std::string&
name, T value)
27 std::ostringstream result;
28 result << std::setw(column_width) << std::left <<
name <<
": " << value << std::endl;
34 std::ostringstream result;
35 result << reportValue(
"MinimizerType", minimizer.
minimizerName());
36 result << reportValue(
"AlgorithmName", minimizer.
algorithmName());
45 std::ostringstream result;
47 for (
auto option : minimizer.
options()) {
48 std::ostringstream opt;
49 opt << std::setw(5) << std::left << option->value() << option->description();
50 result << reportValue(option->name(), opt.str());
60 std::ostringstream result;
64 for (
auto it : status)
65 result << reportValue(it.first, it.second);
78 std::ostringstream result;
81 result << reportDescription(minimizer);
82 result << reportOption(minimizer);
83 result << reportStatus(minimizer);
Declares class MinimizerAdapter.
Declares namespace MinimizerUtils.
Declares report namespace.
Abstract base class that adapts the CERN ROOT minimizer to our IMinimizer.
virtual std::map< std::string, std::string > statusMap() const
Returns map of string representing different minimizer statuses.
std::string minimizerName() const final
Returns name of the minimizer.
std::string algorithmName() const final
Returns name of the minimization algorithm.
MinimizerOptions & options()
std::string toOptionString() const
Returns string with all options (i.e. "Strategy=1;Tolerance=0.01;")
QString const & name(EShape k)
std::string reportToString(const MinimizerAdapter &minimizer)
Reports results of minimization in the form of multi-line string.
std::string sectionString(const std::string §ionName="", size_t report_width=80)
Returns horizontal line of 80 characters length with section name in it.