Histogram Types

This chapter is about the and type that are contained in .

— 1-dimensional histograms


histogramlong size h This type implements all methods on .

alloclong length allocate necessary space, returns None

set_ranges_uniformfloat upper, float lower set the ranges to uniform distance, returns None

reset sets all bin values to 0, returns None

incrementfloat x increments corresponding bin, returns None

accumulatefloat x, float weight adds the weight to corresponding bin, returns None

max returns upper range, as float

min returns lower range, as float

bins returns number of bins, as long

getlong n gets value of indexed bin, returns float

get_rangelong n gets upper and lower range of indexed bin, returns (float,float)

findfloat x finds index of corresponding bin, returns long

max_val returns maximal bin value, as float

max_bin returns bin index with maximal value, as long

min_val returns minimal bin value, as float

min_bin returns bin index with minimal value, as long

mean returns mean of histogram, as float

sigma returns std deviation of histogram, as float

sum returns sum of bin values, as float

set_rangessequence ranges sets range according given sequence, returns None

shiftfloat offset shifts the contents of the bins by the given offset, returns None

scalefloat scale multiplies the contents of the bins by the given scale, returns None

equal_bins_p true if the all of the individual bin ranges are identical, returns int

addhistogram h adds the contents of the bins, returns None

subhistogram h substracts the contents of the bins, returns None

mulhistogram h multiplicates the contents of the bins, returns None

divhistogram h divides the contents of the bins, returns None

clonehistogram h returns a new copy of this histogram, returns new histogram

copyhistogram h copies the given histogram to myself, returns None

readfile input reads histogram binary data from file, returns None

writefile output writes histogram binary data to file, returns None

scanffile input reads histogram data from file using scanf, returns None

printffile output writes histogram data to file using printf, returns None

Some mapping operations are supported, too:

l|ltextttMapping syntaxEffect

For the special meaning and details please consult the GNU Scientific Library reference.

— 2-dimensional histograms


histogram2dlong size x, long size y h This class holds a 2d array and 2 sets of ranges for x and y coordinates for a two paramter statistical event. It can be constructed by size parameters or as a copy from another histogram. Most of the methods are the same as of .

set_ranges_uniformfloat xmin, float xmax, float ymin, float ymax set the ranges to uniform distance, returns None

alloclong nx, long ny allocate necessary space, returns None

reset sets all bin values to 0, returns None

incrementfloat x, float y increments corresponding bin, returns None

accumulatefloat x, float y, float weight adds the weight to corresponding bin, returns None

xmax returns upper x range as float

xmin returns lower x range as float

ymax returns upper y range as float

ymin returns lower y range as float

nx returns number of x bins as long

ny returns number of y bins as long

getlong i, long j gets value of indexed bin,returns float

get_xrangelong i gets upper and lower x range of indexed bin, returns (float , float )

get_yrangelong j gets upper and lower y range of indexed bin, returns (float , float )

findfloat x, float y finds index pair of corresponding value pair, returns (long,long)

max_val returns maximal bin value as float

max_bin returns bin index with maximal value as long

min_val returns minimal bin value as float

min_bin returns bin index with minimal value as long

sum returns sum of bin values as float

xmean returns x mean of histogram as float

xsigma returns x std deviation of histogram as float

ymean returns y mean of histogram asfloat

ysigma returns y std deviation of histogram as float

cov returns covariance of histogram as float

set_rangessequence xranges, sequence yranges set the ranges according to given sequences, returns None

shiftfloat offset shifts the contents of the bins by the given offset, returns None

scalefloat scale multiplies the contents of the bins by the given scale, returns None

equal_bins_p true if the all of the individual bin ranges are identical, returns int

add h adds the contents of the bins, returns None

sub h substracts the contents of the bins, returns None

mul h multiplicates the contents of the bins, returns None

div h divides the contents of the bins, returns None

clone returns a copy instance of

copy h copies the given histogram to myself, returns None

readfile input reads histogram binary data from file, returns None

writewfile output writes histogram binary data to file, returns None

scanffile input reads histogram data from file using scanf, returns None

printffile input writes histogram data to file using printf, returns None

Some mapping operations are supported, too:

l|lcodeMapping syntaxEffect

For the special meaning and details please consult the GNU Scientific Library reference.

and


To be implemented…