mirror of
https://github.com/boostorg/histogram.git
synced 2025-05-11 05:07:58 +00:00
fix comments in example
This commit is contained in:
parent
bb11ac6015
commit
facde2732b
@ -46,11 +46,10 @@ int main() {
|
|||||||
void operator()(double x) {
|
void operator()(double x) {
|
||||||
if (x > value) value = x;
|
if (x > value) value = x;
|
||||||
}
|
}
|
||||||
double value = 0;
|
double value = 0; // value is initialized to zero
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create a histogram with the custom accumulator, initialize the accumulators
|
// Create a histogram that uses the custom accumulator.
|
||||||
// to 1.
|
|
||||||
auto h2 = make_histogram_with(dense_storage<max>(), axis);
|
auto h2 = make_histogram_with(dense_storage<max>(), axis);
|
||||||
h2(0.0, sample(2)); // sample 2 goes to first bin
|
h2(0.0, sample(2)); // sample 2 goes to first bin
|
||||||
h2(0.1, sample(2.5)); // sample 2.5 goes to first bin
|
h2(0.1, sample(2.5)); // sample 2.5 goes to first bin
|
||||||
|
Loading…
x
Reference in New Issue
Block a user