GSL::Histogram.new(n)GSL::Histogram.new(n, [xmin, xmax])GSL::Histogram.new(n, xmin, xmax)GSL::Histogram.alloc(n)GSL::Histogram.equal_bins_p(h1, h2)GSL::Histogram#set_ranges(v)GSL::Histogram#set_ranges_uniform(xmin, xmax)This method sets the ranges of the existing histogram self to cover the range xmin to xmax uniformly. The values of the histogram bins are reset to zero. The bin ranges are shown as below,
bin[0] corresponds to xmin <= x < xmin + d bin[1] corresponds to xmin + d <= x < xmin + 2 d ...... bin[n-1] corresponds to xmin + (n-1)d <= x < xmax
where d is the bin spacing, d = (xmax-xmin)/n.
GSL::Histogram#increment(x)GSL::Histogram#fill(x)GSL::Histogram#accumulate(x, weight)GSL::Histogram#get(i)GSL::Hiatogram#get_range(i)GSL::Histogram#rangeVector::View object as a reference to the pointer
double *range in the gsl_histogram struct.GSL::Histogram#binVector::View object to access the pointer double *bin in the gsl_histogram struct.GSL::Histogram#maxGSL::Histogram#minGSL::Histogram#binsGSL::Histogram#resetGSL::Histogram#find(x)GSL::Histogram#max_valGSL::Histogram#max_binGSL::Histogram#min_valGSL::Histogram#min_binGSL::Histogram#meanGSL::Histogram#sigmaGSL::Histogram#sumGSL::Histogram#addGSL::Histogram#subGSL::Histogram#mulGSL::Histogram#divGSL::Histogram#scaleGSL::Histogram#scale!GSL::Histogram#shiftGSL::Histogram#shift!GSL::Histogram#fwrite(io)GSL::Histogram#fwrite(filename)GSL::Histogram#fread(io)GSL::Histogram#fread(filename)GSL::Histogram#fprintf(io, range_format = "%e", bin_format = "%e")GSL::Histogram#fprintf(filename, range_format = "%e", bin_format = "%e")GSL::Histogram#fscanf(io)GSL::Histogram#fscanf(filename)The probability distribution function for a histogram consists of a set of bins which measure the probability of an event falling into a given range of a continuous variable x. A probability distribution function is defined by the following class, which actually stores the cumulative probability distribution function. This is the natural quantity for generating samples via the inverse transform method, because there is a one-to-one mapping between the cumulative probability distribution and the range [0,1]. It can be shown that by taking a uniform random number in this range and finding its corresponding coordinate in the cumulative probability distribution we obtain samples with the desired probability distribution.
GSL::Histogram::Pdf.new(n)GSL::Histogram::Pdf.alloc(n)GSL::Histogram::Pdf#init(h)GSL::Histogram::Pdf#sample(r)This method uses r, a uniform random number between zero and one, to compute a single random sample from the probability distribution self. The algorithm used to compute the sample s is given by the following formula,
s = range[i] + delta * (range[i+1] - range[i])
where i is the index which satisfies sum[i] <= r < sum[i+1] and delta is (r - sum[i])/(sum[i+1] - sum[i]).
GSL::Histogram::Pdf#nGSL::Histogram:Pdf#rangeVector::View object as a reference to the pointer
double *range in the gsl_histogram_pdf struct.GSL::Histogram:Pdf#sumVector::View object as a reference to the pointer
double *sum in the gsl_histogram_pdf struct.