Stan  2.10.0
probability, sampling & optimization
do_print.hpp
Go to the documentation of this file.
1 #ifndef STAN_SERVICES_IO_DO_PRINT_HPP
2 #define STAN_SERVICES_IO_DO_PRINT_HPP
3 
4 namespace stan {
5  namespace services {
6  namespace io {
7 
25  bool do_print(const int n, const bool special, const int refresh) {
26  return (refresh > 0) &&
27  (special || n == 0 || ((n + 1) % refresh == 0) );
28  }
29 
43  bool do_print(const int n, const int refresh) {
44  return do_print(n, false, refresh);
45  }
46 
47  }
48  }
49 }
50 
51 #endif
Probability, optimization and sampling library.
bool do_print(const int n, const bool special, const int refresh)
Indicates whether it should print on the current iteration.
Definition: do_print.hpp:25

     [ Stan Home Page ] © 2011–2016, Stan Development Team.