Returns a variable size binning for the points.
- Template Parameters
-
Coll | type of collection of the points |
- Parameters
-
centralPoints | set of points to build the bins around |
- Returns
- a pair of bin edge and label collections
This algorithm attempts to create a variable width binning so that all specified points fall in the middle of their respective bin.
- Note
- This algorithm is known to be prone to failure for some point distributions.
The return value is a pair of collections. The first one is a sequence of bin boundaries, starting with the lower edge of the bin for the first point and ending with the upper edge of the last point. Therefore this first collection has a number of element larger than the number of points by one unit. The second collection is a string representing the name of the bin. The first element of this collection is the label of the first bin, that is the label of the bin whose lower edge is the first element of the other collection. The second collection has the same number of elements as the number of points, and smaller by one unit than the edge collection.
Requirements
- the collection
Coll
must be
- the type (
T
) of values in Coll
needs to support the following operations:
- convertible to double:
operator double (T)
- conversion to string (
to_string(T)
)
centralPoint
must contain at least two points