STFINV library: seek source wavelet correction filter
tools.h
Go to the documentation of this file.
1 
38 // include guard
39 #ifndef STFINV_TOOLS_H_VERSION
40 
41 #define STFINV_TOOLS_H_VERSION \
42  "STFINV_TOOLS_H V1.1"
43 
44 #include<iostream>
45 
46 namespace stfinv {
47 
48  namespace tools {
49 
58  bool sameineps(const double &a, const double& b, const double& eps=1.e-8);
59 
60 /* ---------------------------------------------------------------------- */
61 
67  template<class C>
68  void report_engine(std::ostream& os)
69  {
70  os << " ID: ";
71  os.width(10);
72  os.setf(std::ios_base::left);
73  os << C::ID;
74  os.width(0);
75  os << " (" << C::description << ")" << std::endl;
76  } // void report_engine(std::ostream& os)
77 
78 /* ---------------------------------------------------------------------- */
79 
85  template<class C>
86  void report_engine_ID(std::ostream& os)
87  {
88  os << "Identifier to selected this procedure:" << std::endl;
89  report_engine<C>(os);
90  } // void report_engine_ID(std::ostream& os)
91 
92  } // namespace tools
93 
94 } // namespace stfinv
95 
96 #endif // STFINV_TOOLS_H_VERSION (includeguard)
97 
98 /* ----- END OF tools.h ----- */
void report_engine(std::ostream &os)
report engine identifier
Definition: tools.h:68
Root namespace of library.
Definition: doxygen.txt:43
bool sameineps(const double &a, const double &b, const double &eps)
function to compare doubles
Definition: tools.cc:46
void report_engine_ID(std::ostream &os)
report engine identifier with heading
Definition: tools.h:86