class MoreMath::Histogram
def initialize(sequence, arg = 10)
def initialize(sequence, arg = 10) @with_counts = false if arg.is_a?(Hash) bins = arg.fetch(:bins, 10) wc = arg[:with_counts] and @with_counts = wc else bins = arg end @sequence = sequence @bins = bins @result = compute end