| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef INTERVAL_H
- #define INTERVAL_H
- #include <QString>
- /**
- * Class representing intervals
- * of real numbers.
- */
- class Interval
- {
- public:
- /**
- * Constructor.
- * @param min lowest value of the interval
- * @param max highest value of the interval
- * @param label name of the interval
- */
- Interval(double min, double max, QString label);
- /**
- * Check if value is in the interval.
- * @param value
- * @return true/false
- */
- bool in(double value) const;
- /**
- * Getter for label.
- * @return label
- */
- QString getLabel() const;
- /**
- * @brief Getter for min.
- * @return min
- */
- double getMin() const;
- /**
- * Getter for max
- * @return max
- */
- double getMax() const;
- private:
- double _min;
- double _max;
- QString _label;
- };
- #endif // INTERVAL_H
|