Sha256: 3ea372dd3e78b9d525a2f68c7d0196abc1b0ee13144a5ee96c33121d29e4f7c9

Contents?: true

Size: 536 Bytes

Versions: 2

Compression:

Stored size: 536 Bytes

Contents

# Binneroc

Bins in constant time, O(c) or O(1).

# Example

My use case is a spectrum of x,y data points (an x position associated with
some intensity y).  You would like to bin the signal into discrete bin points
such that all the intensity is associated with equally spaced bins.  The
simple algorithm used here finds the proper bin in constant time.

xvals = [3.3, 4.5, 6.6]
yvals = [4,    10,   2]

(newx, newy) = Binneroc.bin(xvals, yvals)

## Installation

    gem install binneroc

## Copyright

MIT License.  See LICENSE.txt.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
binneroc-0.0.2 README.md
binneroc-0.0.1 README.md