48 : urg_(
mUdf(T),
mUdf(T)) { setRange(l,
true); }
79 udfstart_ =
mIsUdf(rg_.start); udfstop_ =
mIsUdf(rg_.stop);
80 udfustart_ =
mIsUdf(urg_.start); udfustop_ =
mIsUdf(urg_.stop);
81 if ( !udfstart_ && !udfustart_ && urg_.start <= rg_.start )
82 { urg_.start =
mUdf(T); udfustart_ =
true; }
83 if ( !udfstop_ && !udfustop_ && urg_.stop >= rg_.stop )
84 { urg_.stop =
mUdf(T); udfustop_ =
true; }
100 else if ( v < urg_.start )
102 const T w = rg_.start - urg_.start;
103 v = rg_.start - ((w*w) / (v + w - urg_.start));
113 else if ( v > urg_.stop )
115 const T w = rg_.stop - urg_.stop;
116 v = rg_.stop - ((w*w) / (v + w - urg_.stop));
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
bool udfustop_
Definition: squeezing.h:66
void setUntouchedRange(T u0, T u1)
Definition: squeezing.h:53
Interval of values.
Definition: commontypes.h:31
void setRange(const Interval< T > &, bool lim)
Definition: squeezing.h:72
bool udfstop_
Definition: squeezing.h:65
void setUntouchedRange(const Interval< T > &r)
Definition: squeezing.h:49
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
Interval< T > rg_
Definition: squeezing.h:63
Fits values into a pre-defined range.
Definition: squeezing.h:43
T stop
Definition: ranges.h:93
const Interval< T > & range(bool lim) const
Definition: squeezing.h:58
DataSqueezer(const Interval< T > &l)
Definition: squeezing.h:47
DataSqueezer(T l0, T l1)
Definition: squeezing.h:51
T start
Definition: ranges.h:92
T value(T) const
Definition: squeezing.h:89
virtual void sort(bool asc=true)
Definition: ranges.h:585
#define mClass(module)
Definition: commondefs.h:164
Interval< T > urg_
Definition: squeezing.h:64