writer.hpp
Go to the documentation of this file.
1 #ifndef STAN_CALLBACKS_WRITER_HPP
2 #define STAN_CALLBACKS_WRITER_HPP
3 
4 #include <boost/lexical_cast.hpp>
5 #include <string>
6 #include <vector>
7 
8 namespace stan {
9  namespace callbacks {
10 
11  /**
12  * <code>writer</code> is a base class defining the interface
13  * for Stan writer callbacks. The base class can be used as a
14  * no-op implementation.
15  */
16  class writer {
17  public:
18  /**
19  * Virtual destructor.
20  */
21  virtual ~writer() {}
22 
23  /**
24  * Writes a set of names.
25  *
26  * @param[in] names Names in a std::vector
27  */
28  virtual void operator()(const std::vector<std::string>& names) {
29  }
30 
31  /**
32  * Writes a set of values.
33  *
34  * @param[in] state Values in a std::vector
35  */
36  virtual void operator()(const std::vector<double>& state) {
37  }
38 
39  /**
40  * Writes blank input.
41  */
42  virtual void operator()() {
43  }
44 
45  /**
46  * Writes a string.
47  *
48  * @param[in] message A string
49  */
50  virtual void operator()(const std::string& message) {
51  }
52  };
53 
54  }
55 }
56 #endif
virtual void operator()(const std::vector< std::string > &names)
Definition: writer.hpp:28
virtual void operator()()
Definition: writer.hpp:42
virtual void operator()(const std::vector< double > &state)
Definition: writer.hpp:36
def callbacks(model_name, group, tensorboard=True)
Definition: regression.py:123
virtual void operator()(const std::string &message)
Definition: writer.hpp:50
enum BeamMode string