The Sparta Modeling Framework
Loading...
Searching...
No Matches
StatisticSnapshot.hpp
1// <StatisticSnapshot> -*- C++ -*-
2
3#pragma once
4
5namespace sparta {
6namespace statistics {
7
18{
19public:
20 explicit StatisticSnapshot(double & value) :
21 value_(value)
22 {}
23
24 inline double takeSnapshot(const double value) {
25 value_ = value;
26 return value_;
27 }
28
29private:
30 double & value_;
31};
32
33} // namespace statistics
34} // namespace sparta
35
User-friendly wrapper around a double reference. This is like a std::reference_wrapper that connects ...
Macros for handling exponential backoff.