Class observe::BinWidthDistribution
BinWidthDistribution observable.
In addition to the mean and standard deviation, keeps track of the full histogram of recorded values in bins of the specified bin_width
. This histogram can become quite large if you specify a small bin width in relation to the range of recorded values.
Note
There is a bin centered around 0 and bins are directly adjacent to each other.
Inherited Members
Constructors
BinWidthDistribution()
Declaration
observe::BinWidthDistribution::BinWidthDistribution(double bin_width)
Methods
reset()
Declaration
void observe::BinWidthDistribution::reset() override
record()
Declaration
void observe::BinWidthDistribution::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::BinWidthDistribution::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