43 template<
typename Treal>
65 else if (other.
empty()) {
87 if ( !intersection.
empty() ) {
117 inline bool cover(Treal
const value)
const {
121 return (value <= upperBound && value >=
lowerBound);
133 throw Failure(
"Interval<Treal>::increase(Treal const) : " 134 "Attempt to increase empty interval.");
163 return *
this + (-1.0 * other);
191 void puriStep(
int poly, Treal alpha);
201 template<
typename Treal>
207 template<
typename Treal>
216 template<
typename Treal>
221 assert(other.
low() >= 0);
227 template<
typename Treal>
230 throw Failure(
"Interval<Treal>::puriStep(int) : It is assumed here " 231 "that the interval I is within [-1.0, 2.0]");
245 bool nonEmptyIntervalInZeroToOne =
false;
247 nonEmptyIntervalInZeroToOne =
true;
254 if(nonEmptyIntervalInZeroToOne && upperBound < lowerBound) {
268 template<
typename Treal>
271 throw Failure(
"Interval<Treal>::puriStep(int) : It is assumed here " 272 "that the interval I is within [-1.0, 1.0]");
291 template<
typename Treal>
294 throw Failure(
"Interval<Treal>::puriStep(int, real) : It is assumed here " 295 "that the interval I is within [-1.0, 2.0]");
309 bool nonEmptyIntervalInZeroToOne =
false;
311 nonEmptyIntervalInZeroToOne =
true;
318 if(nonEmptyIntervalInZeroToOne && upperBound < lowerBound) {
332 template<
typename Treal>
335 throw Failure(
"Interval<Treal>::invPuriStep(int, real) : It is assumed here " 336 "that the interval I is within [-1.0, 2.0]");
356 template<
typename Treal>
362 s<<
"["<<in.
low()<<
", "<<in.
upp()<<
"]";
Interval< Treal > operator*(Treal const &value) const
Definition: Interval.h:154
bool overlap(Interval const &other) const
Definition: Interval.h:123
Treal upp() const
Definition: Interval.h:143
Treal length() const
Returns the length of the interval.
Definition: Interval.h:107
void decrease(Treal const value)
Definition: Interval.h:138
Interval(Treal low=1, Treal upp=-1)
Definition: Interval.h:46
Interval< Treal > operator+(Treal const &value) const
Definition: Interval.h:181
static Interval intersect(Interval const &A, Interval const &B)
Definition: Interval.h:51
Interval< Treal > operator/(Treal const &value) const
Definition: Interval.h:172
void increase(Treal const value)
Increases interval with value in both directions.
Definition: Interval.h:131
bool empty() const
Definition: Interval.h:49
Definition: allocate.cc:30
Treal midPoint() const
Definition: Interval.h:113
Definition: Interval.h:44
void invPuriStep(int poly)
Definition: Interval.h:269
void puriStep(int poly)
Definition: Interval.h:228
Interval< Treal > operator-(Treal const &value) const
Definition: Interval.h:178
Treal low() const
Definition: Interval.h:142
bool cover(Treal const value) const
Definition: Interval.h:117
Interval< Treal > sqrtInt(Interval< Treal > const &other)
Definition: Interval.h:217
Treal upperBound
Definition: Interval.h:195
std::ostream & operator<<(std::ostream &s, Interval< Treal > const &in)
Definition: Interval.h:357
void intersect(Interval const &other)
Definition: Interval.h:62
Interval< Treal > operator+(Interval< Treal > const &other) const
Definition: Interval.h:168
Treal lowerBound
Definition: Interval.h:194
Interval< Treal > operator-(Interval< Treal > const &other) const
Definition: Interval.h:162
void intersect_always_non_empty(Interval const &other)
Definition: Interval.h:78
Treal template_blas_sqrt(Treal x)