]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/interval.hh
Run `make grand-replace'.
[lilypond.git] / flower / include / interval.hh
index 6cc16eb6966c9a5815c671aacc011c8cf162697d..9808bfaef652768c93d8bb97dd0b1f02716fd030 100644 (file)
@@ -1,7 +1,7 @@
 /*
   interval.hh -- part of flowerlib
 
-  (c) 1996--2006 Han-Wen Nienhuys
+  (c) 1996--2008 Han-Wen Nienhuys
 */
 
 #ifndef INTERVAL_HH
@@ -9,8 +9,6 @@
 
 #include <math.h>
 
-#include "std-string.hh"
-
 #include "flower-proto.hh"
 #include "drul-array.hh"
 
@@ -23,7 +21,7 @@ struct Interval_t : public Drul_array<T>
   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)
   {
@@ -61,9 +59,6 @@ struct Interval_t : public Drul_array<T>
   void set_empty ();
   void set_full ();
 
-  /*
-    TODO: strip hungarian suffix.
-  */
   bool is_empty () const
   {
     return at (LEFT) > at (RIGHT);
@@ -105,12 +100,8 @@ struct Interval_t : public Drul_array<T>
     return *this;
   }
 
-  Real linear_combination (Real x) const
-  {
-    Drul_array<Real> da (at (LEFT), at (RIGHT));
-    return ::linear_combination (da, x);
-  }
-  std::string to_string () const;
+  Real linear_combination (Real x) const;
+  string to_string () const;
 
   bool contains (T r) const;
   void negate ()
@@ -128,9 +119,9 @@ struct Interval_t : public Drul_array<T>
     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];
   }
 };