31 #ifndef DATATOOLS_REAL_RANGE_H 32 #define DATATOOLS_REAL_RANGE_H 79 void set(
double from_,
109 double width(
double tolerance_ = -1.0)
const;
112 bool is_empty(
double tolerance_ = -1.0)
const;
118 double singleton(
double tolerance_ = -1.0)
const;
154 bool lower_included_ =
true,
155 bool upper_included_ =
true);
158 bool has(
double value_,
double tolerance_ = -1.0)
const;
161 bool has(
const real_range & rr_,
double tolerance_ = -1.0)
const;
164 void dump(std::ostream & out_ = std::clog,
double tolerance_ = -1.0)
const;
167 double first(
double tolerance_ = -1.0)
const;
170 double last(
double tolerance_ = -1.0)
const;
197 friend std::ostream &
operator<<(std::ostream & out_,
201 friend std::istream &
operator>>(std::istream & in_,
206 double relative_tolerance_ = -1.0);
230 std::string _unit_label_;
231 std::string _preferred_unit_;
240 #endif // DATATOOLS_REAL_RANGE_H