Skip to content

Commit

Permalink
Update verbose_on/off to return lfmcmc object
Browse files Browse the repository at this point in the history
  • Loading branch information
apulsipher committed Dec 12, 2024
1 parent 70f0948 commit 77dd064
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
22 changes: 18 additions & 4 deletions epiworld.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1321,8 +1321,8 @@ class LFMCMC {
std::vector< epiworld_double > get_mean_stats();

// Printing
void verbose_off() { verbose = false; };
void verbose_on() { verbose = true; };
LFMCMC<TData> & verbose_off();
LFMCMC<TData> & verbose_on();
void print(size_t burnin = 0u) const;

};
Expand Down Expand Up @@ -1619,8 +1619,8 @@ class LFMCMC {
std::vector< epiworld_double > get_mean_stats();

// Printing
void verbose_off() { verbose = false; };
void verbose_on() { verbose = true; };
LFMCMC<TData> & verbose_off();
LFMCMC<TData> & verbose_on();
void print(size_t burnin = 0u) const;

};
Expand Down Expand Up @@ -2436,6 +2436,20 @@ inline std::vector< epiworld_double > LFMCMC<TData>::get_mean_stats()

}

template<typename TData>
inline LFMCMC<TData> & LFMCMC<TData>::verbose_off()
{
verbose = false;
return *this;
}

template<typename TData>
inline LFMCMC<TData> & LFMCMC<TData>::verbose_on()
{
verbose = true;
return *this;
}

#endif
/*//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
Expand Down
4 changes: 2 additions & 2 deletions include/epiworld/math/lfmcmc/lfmcmc-bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ class LFMCMC {
std::vector< epiworld_double > get_mean_stats();

// Printing
void verbose_off() { verbose = false; };
void verbose_on() { verbose = true; };
LFMCMC<TData> & verbose_off();
LFMCMC<TData> & verbose_on();
void print(size_t burnin = 0u) const;

};
Expand Down
14 changes: 14 additions & 0 deletions include/epiworld/math/lfmcmc/lfmcmc-meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,18 @@ inline std::vector< epiworld_double > LFMCMC<TData>::get_mean_stats()

}

template<typename TData>
inline LFMCMC<TData> & LFMCMC<TData>::verbose_off()
{
verbose = false;
return *this;
}

template<typename TData>
inline LFMCMC<TData> & LFMCMC<TData>::verbose_on()
{
verbose = true;
return *this;
}

#endif

0 comments on commit 77dd064

Please sign in to comment.