Class InputAxis::Histogram#

Nested Relationships#

This class is a nested type of Class InputAxis.

Class Documentation#

class Histogram

Public Functions

Histogram(DefVariable var)

Creates an empty Histogram for this variable with the specified number of intervals.

Parameters:

var – the variable to present

void calculate(const std::vector<double> &data)

Calculates equidistant data sections and stores them.

Parameters:

data – the input values of this variable

double get_section_frequency(std::size_t i) const

Returns the value of the histogram graph in this section. They are associated with the relative frequency of the equidistant intervals.

Parameters:

i – index of the section

Returns:

the height

inline std::size_t get_num_intervals(void) const

Returns the number of equidistant intervals the domain of this Histogram’s Variable is divided in.

Returns:

the interval count

inline void set_num_intervals(std::size_t num_intervals)

Sets the histogram to have a given number of equidistant intervals. If values for an old number of intervals have been stored, all data from is deleted and the frequencies set to 0.

Parameters:

num_interval – the new interval count