Stan  2.5.0
probability, sampling & optimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
do_print.hpp
Go to the documentation of this file.
1 #ifndef STAN__COMMON__DO_PRINT_HPP
2 #define STAN__COMMON__DO_PRINT_HPP
3 
4 namespace stan {
5 
6  namespace common {
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 #endif
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–2014, Stan Development Team.