histogrammar / histogrammar-docs

Jekyll sources for https://histogrammar.github.io/histogrammar-docs/.
Apache License 2.0
2 stars 2 forks source link

CentrallyBin: Behavior when `q` is equidistant between two centers #25

Closed isaacsanders closed 7 years ago

isaacsanders commented 7 years ago

Hey all,

It doesn't appear that the behavior is defined in the specification.

Currently, the Python example code used in the specification appears to favor the right bin in a pair of bins, so if that is the desired behavior, we should document it.

jpivarski commented 7 years ago

Another good catch. The Python code in the specification is intended to answer questions like this, so I guess the 1.0 specification says that it should go to the right.

When a point is exactly on a bin edge in Bin, it also goes to the right (for consistency with HBOOK and all of its descendants). The idea is that all the bins are intervals that are closed on the left and open on the right. I remember making sure that IrregularlyBin had the same behavior, though for irregularly spaced bins, and the last bin happens to include the point at infinity.

So it sounds like this (accidental?) definition of CentrallyBin is consistent with the other binning Aggregators.

I'll add a sentence to the documentation when I can.

jpivarski commented 7 years ago

Done.