BornAgain  1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
MinimizerUtils.h
Go to the documentation of this file.
1 // ************************************************************************** //
2 //
3 // BornAgain: simulate and fit scattering at grazing incidence
4 //
5 //! @file Fit/Tools/MinimizerUtils.h
6 //! @brief Declares namespace MinimizerUtils.
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************** //
14 
15 #ifndef BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
16 #define BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
17 
18 #include <map>
19 #include <string>
20 #include <vector>
21 
22 //! Utility functions for fit library
23 
24 namespace MinimizerUtils
25 {
26 
27 std::string toString(const std::vector<std::string>& v, const std::string& delim = "");
28 
29 std::map<int, std::string> gslErrorDescriptionMap();
30 
31 std::string gslErrorDescription(int errorCode);
32 
33 bool numbersDiffer(double a, double b, double tol);
34 
35 std::string sectionString(const std::string& sectionName = "", size_t report_width = 80);
36 
37 } // namespace MinimizerUtils
38 
39 #endif // BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
Utility functions for fit library.
std::string toString(const std::vector< std::string > &v, const std::string &delim="")
std::string sectionString(const std::string &sectionName="", size_t report_width=80)
Returns horizontal line of 80 characters length with section name in it.
bool numbersDiffer(double a, double b, double tol)
std::map< int, std::string > gslErrorDescriptionMap()
Returns translation of GSL error code to string.
std::string gslErrorDescription(int errorCode)