Class observe::LogBatched
LograithmicBatched.
This creates a "logarithmically batched" version of any observable which records a timeline with batches doubling in size over time. I.e., after a total weight of 32 has been recorded, the observable is rendered to the timeline of batches and the observable itself is reset with a new batch size of 64. Example: LogBatched(BinWidthDistribution(0.2), 16) records the evolution of a histogram:
- 16 values are recorded into the first batch
- 32 values will be recorded into the next batch
- the histogram is grouped into bins of width 0.2
Inherited Members
Constructors
LogBatched()
Declaration
observe::LogBatched::LogBatched(std::unique_ptr<Observable>&&observable, double initial_batch_size=1)
LogBatched()
Declaration
observe::LogBatched::LogBatched(const LogBatched&)=delete
Methods
operator=()
Declaration
LogBatched&observe::LogBatched::operator=(const LogBatched&)=delete
reset()
Declaration
void observe::LogBatched::reset() override
record()
Declaration
void observe::LogBatched::record(double value, double weight) override
render()
render the object in structured form
Return a structured representation of the object. This is intended for output purposes. For instance, the solution your solver finds should have a render method which allows it to be returned as part of the result. Example:
{c++}
MySolution : public Component {
public:
// Represent the internal bool vector as +-1 output.
utils::Structure render() const override {
utils::Structure rendered;
for (bool item : solution_) rendered.push_back(item ? 1 : -1);
return rendered;
}
private:
std::vector<bool> solution_;
}
MySolution solution;
std::cout << solution.render().to_string() << std::endl;
Declaration
Structure observe::LogBatched::render() const override
record()
Declaration
void observe::Observable::record(double value)
record()
Declaration
void observe::Observable::record(int value)
record()
Declaration
void observe::Observable::record(size_t value)
record()
Declaration
virtual void observe::Observable::record(double value, double weight)=0