Class InputAxis#
Defined in File InputAxis.h
Nested Relationships#
Nested Types#
Class Documentation#
-
class InputAxis#
InputAxis MooViE component representation.
A InputAxis is an axis which displays the possible values of a input variable. It is visualized as a ring segment with a distinct color and has ticks for better readability.
- Author
stratmann
- Date
12.12.2017
Public Functions
-
InputAxis(DefVariable variable, const Angle &start, const Angle &end, double radius, double height, const DrawerProperties<> &prop)#
constructor
Creates a InputAxis presenting a given variable and is drawn between given angles with given radius, height and properties.
- Parameters:
variable – the variable to present
start – the start angle
end – the end angle
radius – the radius from the center
height – the height beginning at the radius
prop – the DrawerProperties
-
inline const DefVariable &get_var() const#
Returns a const reference to the variable this InputAxis presents.
- Returns:
the Var
-
inline const Histogram &get_histogram() const#
Returns a reference to its histogram. The InputAxis::calculate_histogram function has to called before drawing the histogram because it is empty by default.
- Returns:
the Histogram
-
inline const Angle &get_start() const#
Returns the start Angle of this InputAxis’ drawing span.
- Returns:
the start Angle
-
inline void set_start(const Angle &start)#
Starts the start Angle of this InputAxis’ drawing span.
- Parameters:
start – the start Angle to set
-
inline const Angle &get_end() const#
Returns the end Angle of this InputAxis’ drawing span.
- Returns:
the end Angle
-
inline void set_end(const Angle &end)#
Sets the end Angle of this InputAxis’ drawing span.
- Parameters:
end – the end Angle to set
-
inline double get_radius() const#
Returns the radius measured from the center of the coordinate system.
- Returns:
the radius
-
inline void set_radius(double radius)#
Sets the radius measured from the center of the coordinate system.
- Parameters:
radius – the radius to set
-
inline double get_height() const#
Returns the height measured from the radius.
- Returns:
the height
-
inline void set_height(double height)#
Sets the height measured from the radius.
- Parameters:
height – the height to set
-
inline const DrawerProperties &get_prop() const#
Returns the DrawerProperties that will be used to draw this InputAxis.
- Returns:
the DrawerProperties
-
inline void set_prop(const DrawerProperties<> &prop)#
Sets the DrawerProperties that will be used to draw this InputAxis.
- Parameters:
prop – the DrawerProperties to set
-
inline const SimpleScale &get_scale() const#
Returns the SimpleScale of this InputAxis. This scale instance defines how the graphical scale will be drawn.
- Returns:
the SimpleScale
-
inline Label make_label(const TextProperties &prop) const#
Constructs a label using the given TextProperties’ style and this InputAxis’ variable name.
- Parameters:
prop –
-
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
-
Histogram(DefVariable var)#