Boost logo

Boost :

Subject: Re: [boost] Formal Review of Proposed Boost.Histogram Library Starts TODAY
From: a.hagen-zanker_at_[hidden]
Date: 2018-09-24 11:24:47


> shape() is more concise than `size() + has_overflow() + has_underflow()`, and the doxy string explains what it returns. If you have a better name, let me know

I suppose total_size() or full_size() is more intuitive, but of course not so elegant to have both size() and total_size().

[...]

> Secondly, spellings mistakes are unlikely. When do you add histograms? When you have generated several histograms in parallel and then you want to add them all up. The individual histograms will be generated by the very same code, so no spelling mistakes.

No need to check for identical labels either then.

[...]

> This is explained in detail in the guide. You are basically saying: why do I need to make a choice between std::array, std::vector, and std::tuple. They are all containers, how they work is an implementation detail. When you can use compile-time configured histograms, they are much better, but sometimes you can't. Therefore, the library also supports histograms which are configured at run-time. Under the hood, these two implementations are very different. For the most part, the difference is hidden from you. You just either use make_static_histogram or make_dynamic_histogram and that's it. I cannot hide the difference completely, so I need to inform the user about it.

I didn't object to make_static_histogram() / make_dynamic_histogram(), as you explain these reflect a choice the user has to make.

I did object to:

auto h = histogram< vector<axis_any> > { move(my_axis _vector)};

which requires more detailed knowledge about the histogram class.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk