Tomographer
v5.2
Tomographer C++ Framework Documentation
|
A simple MHRWStatsCollector interface which combines several stats collectors. More...
#include <tomographer/mhrwstatscollectors.h>
Public Types | |
typedef std::tuple< MHRWStatsCollectors &... > | MHRWStatsCollectorsRefTupleType |
typedef std::tuple< MHRWStatsCollectors... > | MHRWStatsCollectorsTupleType |
typedef std::tuple< typename tomo_internal::multistatscoll_result_type_helper< MHRWStatsCollectors >::ResultType... > | ResultType |
Public Member Functions | |
MultipleMHRWStatsCollectors (MHRWStatsCollectors &... statscollectors_) | |
MultipleMHRWStatsCollectors (const MultipleMHRWStatsCollectors< MHRWStatsCollectors... > ©)=default | |
It's explicitly allowed to copy this stats collector. | |
template<int I> | |
const std::tuple_element< I, MHRWStatsCollectorsTupleType >::type & | getStatsCollector () const |
ResultType | getResult () const |
ResultType | stealResult () |
Static Public Attributes | |
static constexpr int | NumStatColl = sizeof...(MHRWStatsCollectors) |
The number of stats collectors we are tracking. | |
A simple MHRWStatsCollector interface which combines several stats collectors.
A MHRandomWalk object expects one instance of a MHRWStatsCollector (see MHRWStatsCollector Interface); in case you wish to provide several stats collectors, you should use a MultipleMHRWStatsCollectors instance which combines all your preferred stats collectors.
The obscure variadic templating of this class should not scare you—it's relatively straightforward to use:
This class also implements the Resultable Interface interface, providing a ResultType member type which is a tuple of, for each stats collector, either its ResultType, or an empty type if the stats collector doesn't have a ResultType member.
The number of stat collectors that were defined is accessible through the constant enumeration value NumStatColl.
Definition at line 157 of file mhrwstatscollectors.h.