45 template<
typename Treal>
67 else if (other.
empty()) {
89 if ( !intersection.
empty() ) {
119 inline bool cover(Treal
const value)
const {
123 return (value <= upperBound && value >=
lowerBound);
135 throw Failure(
"Interval<Treal>::increase(Treal const) : " 136 "Attempt to increase empty interval.");
165 return *
this + (-1.0 * other);
193 void puriStep(
int poly, Treal alpha);
203 template<
typename Treal>
209 template<
typename Treal>
218 template<
typename Treal>
223 assert(other.
low() >= 0);
229 template<
typename Treal>
232 throw Failure(
"Interval<Treal>::puriStep(int) : It is assumed here " 233 "that the interval I is within [-1.0, 2.0]");
247 bool nonEmptyIntervalInZeroToOne =
false;
249 nonEmptyIntervalInZeroToOne =
true;
256 if(nonEmptyIntervalInZeroToOne && upperBound < lowerBound) {
270 template<
typename Treal>
273 throw Failure(
"Interval<Treal>::puriStep(int) : It is assumed here " 274 "that the interval I is within [-1.0, 1.0]");
293 template<
typename Treal>
296 throw Failure(
"Interval<Treal>::puriStep(int, real) : It is assumed here " 297 "that the interval I is within [-1.0, 2.0]");
311 bool nonEmptyIntervalInZeroToOne =
false;
313 nonEmptyIntervalInZeroToOne =
true;
320 if(nonEmptyIntervalInZeroToOne && upperBound < lowerBound) {
334 template<
typename Treal>
337 throw Failure(
"Interval<Treal>::invPuriStep(int, real) : It is assumed here " 338 "that the interval I is within [-1.0, 2.0]");
358 template<
typename Treal>
364 s<<
"["<<in.
low()<<
", "<<in.
upp()<<
"]";
Treal upp() const
Definition: Interval.h:145
Interval< Treal > operator*(Treal const &value) const
Definition: Interval.h:156
void decrease(Treal const value)
Definition: Interval.h:140
Interval(Treal low=1, Treal upp=-1)
Definition: Interval.h:48
Treal low() const
Definition: Interval.h:144
static Interval intersect(Interval const &A, Interval const &B)
Definition: Interval.h:53
Interval< Treal > operator+(Treal const &value) const
Definition: Interval.h:183
Interval< Treal > operator-(Interval< Treal > const &other) const
Definition: Interval.h:164
bool overlap(Interval const &other) const
Definition: Interval.h:125
Interval< Treal > operator+(Interval< Treal > const &other) const
Definition: Interval.h:170
void increase(Treal const value)
Increases interval with value in both directions.
Definition: Interval.h:133
Definition: allocate.cc:39
Definition: Interval.h:46
void invPuriStep(int poly)
Definition: Interval.h:271
void puriStep(int poly)
Definition: Interval.h:230
Interval< Treal > sqrtInt(Interval< Treal > const &other)
Definition: Interval.h:219
Treal midPoint() const
Definition: Interval.h:115
Treal upperBound
Definition: Interval.h:197
std::ostream & operator<<(std::ostream &s, Interval< Treal > const &in)
Definition: Interval.h:359
bool cover(Treal const value) const
Definition: Interval.h:119
void intersect(Interval const &other)
Definition: Interval.h:64
Treal length() const
Returns the length of the interval.
Definition: Interval.h:109
Treal lowerBound
Definition: Interval.h:196
Interval< Treal > operator-(Treal const &value) const
Definition: Interval.h:180
Interval< Treal > operator/(Treal const &value) const
Definition: Interval.h:174
bool empty() const
Definition: Interval.h:51
void intersect_always_non_empty(Interval const &other)
Definition: Interval.h:80
Treal template_blas_sqrt(Treal x)