23 const int column_width = 18;
26 std::string reportValue(
const std::string& name, T value)
28 std::ostringstream result;
29 result << std::setw(column_width) << std::left << name <<
": " << value << std::endl;
35 std::ostringstream result;
36 result << reportValue(
"MinimizerType", minimizer.
minimizerName());
37 result << reportValue(
"AlgorithmName", minimizer.
algorithmName());
46 std::ostringstream result;
48 for (
const auto& option : minimizer.
options()) {
49 std::ostringstream opt;
50 opt << std::setw(5) << std::left << option->value_str() << option->description();
51 result << reportValue(option->name(), opt.str());
61 std::ostringstream result;
65 for (
const auto& it : status)
66 result << reportValue(it.first, it.second);
79 std::ostringstream result;
82 result << reportDescription(minimizer);
83 result << reportOption(minimizer);
84 result << reportStatus(minimizer);
Declares class MinimizerAdapter.
Declares namespace MinimizerUtils.
Declares report namespace.
Abstract base class that adapts the CERN ROOT minimizer to our IMinimizer.
std::string algorithmName() const override
Returns name of the minimization algorithm.
virtual std::map< std::string, std::string > statusMap() const
Returns map of string representing different minimizer statuses.
std::string minimizerName() const override
Returns name of the minimizer.
MinimizerOptions & options()
std::string toOptionString() const
Returns string with all options (i.e. "Strategy=1;Tolerance=0.01;")
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.