/*
interval.hh -- part of flowerlib
- (c) 1996--2006 Han-Wen Nienhuys
+ (c) 1996--2007 Han-Wen Nienhuys
*/
#ifndef INTERVAL_HH
#include <math.h>
-#include "std-string.hh"
-
#include "flower-proto.hh"
#include "drul-array.hh"
Drul_array<T>::at;
static T infinity ();
- static std::string T_to_string (T arg);
+ static string T_to_string (T arg);
T center () const;
void translate (T t)
{
Drul_array<Real> da (at (LEFT), at (RIGHT));
return ::linear_combination (da, x);
}
- std::string to_string () const;
+ string to_string () const;
bool contains (T r) const;
void negate ()
at (RIGHT) = t;
}
- static int left_comparison (Interval_t<T> const &a, Interval_t<T> const &b)
+ static bool left_less (Interval_t<T> const &a, Interval_t<T> const &b)
{
- return sign (a[LEFT] - b[RIGHT]);
+ return a[LEFT] < b[RIGHT];
}
};