BornAgain  1.19.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 reflection and scattering
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 #ifdef SWIG
16 #error no need to expose this header to Swig
17 #endif
18 
19 #ifndef USER_API
20 #ifndef BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
21 #define BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
22 
23 #include <map>
24 #include <string>
25 #include <vector>
26 
27 //! Utility functions for fit library
28 
29 namespace mumufit::utils {
30 
31 std::string toString(const std::vector<std::string>& v, const std::string& delim = "");
32 
33 std::map<int, std::string> gslErrorDescriptionMap();
34 
35 std::string gslErrorDescription(int errorCode);
36 
37 bool numbersDiffer(double a, double b, double tol);
38 
39 std::string sectionString(const std::string& sectionName = "", size_t report_width = 80);
40 
41 } // namespace mumufit::utils
42 
43 #endif // BORNAGAIN_FIT_TOOLS_MINIMIZERUTILS_H
44 #endif // USER_API
Utility functions for fit library.
bool numbersDiffer(double a, double b, double tol)
std::string gslErrorDescription(int errorCode)
std::map< int, std::string > gslErrorDescriptionMap()
Returns translation of GSL error code to string.
std::string sectionString(const std::string &sectionName="", size_t report_width=80)
Returns horizontal line of 80 characters length with section name in it.
std::string toString(const std::vector< std::string > &v, const std::string &delim="")