|
Boost : |
Subject: Re: [boost] Formal Review of Proposed Boost.Histogram Library Starts TODAY
From: Hans Dembinski (hans.dembinski_at_[hidden])
Date: 2018-09-27 08:32:35
> On 26. Sep 2018, at 19:01, <a.hagen-zanker_at_[hidden]> <a.hagen-zanker_at_[hidden]> wrote:
>
> >Histogram uses a generalized bin concept, where a single bin can represent a single value on an axis or a domain of values.
>
> That is exactly why a generic member function called value() makes no sense to me. It is not a given that the bin has a single value.
Could you please stop arguing and look into the code and the examples? The builtin axis types come with two kinds of bin_types, one based on interval_view, which has no value() method, but a lower() and upper() method, and one based on value_view, which has a value() method. It all makes sense.
> > When you have an category axis that represents the sequence "red", "green", "blue", then what's the domain for the bin "red"?
>
> Well that would just consist of be the value "red" wouldn't it. Somehow we're talking past each other. I am perfectly fine with a bin consisting of a single value. But in the general case you cannot expect bins to have a single value. Maybe you never intended that. However, I then think your example 2 could be better chosen. I assumed this to demonstrate general behaviour.
That's your fault then. The Getting Started section just has some examples to get you started and give you a feel about the library. It is not intended to give you a full tour of the library and/or to explain all details. For that you need to read the User Guide.
> >The library is not forcing you to define your own bins in this way.
>
> The library isn't forcing me to do anything, but if I want to use it, I have to conform to its concepts, right.?
There is no BinType concept, as you have noted, which means you are free to define your bin_types in almost arbitrary weird ways.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk