]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.8
authorfred <fred>
Thu, 28 Nov 1996 11:02:01 +0000 (11:02 +0000)
committerfred <fred>
Thu, 28 Nov 1996 11:02:01 +0000 (11:02 +0000)
flower/README [new file with mode: 0644]
flower/fproto.hh [new file with mode: 0644]
flower/interval.hh [new file with mode: 0644]
flower/lgetopt.cc

diff --git a/flower/README b/flower/README
new file mode 100644 (file)
index 0000000..d33c68f
--- /dev/null
@@ -0,0 +1,10 @@
+This library contains some general purpose routines which aren't
+standardised yet. It was written by:
+
+       Han-Wen Nienhuys <hanwen@stack.nl>
+
+and
+
+       Jan Nieuwenhuizen <jan@digicash.com>
+
+It is licensed under the GNU GPL.
\ No newline at end of file
diff --git a/flower/fproto.hh b/flower/fproto.hh
new file mode 100644 (file)
index 0000000..5241a13
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+  fproto.hh -- typenames in flowerlib
+
+  (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef FPROTO_HH
+#define FPROTO_HH
+
+template<class T> struct svec;
+template<class T> struct sstack;
+template<class T,class K> struct Assoc;
+template<class T> struct List;
+template<class T> struct PointerList;
+template<class T> struct IPointerList;
+template<class T> struct Cursor;
+template<class T> struct PCursor;
+template<class T> struct Link;
+template<class T> struct Handle ;
+
+
+struct Assoc_ent_ ;
+struct Assoc ;
+struct Assoc_iter ;
+struct Choleski_decomposition ;
+struct Interval ;
+struct long_option_init ;
+struct Getopt_long ;
+struct Matrix ;
+struct StringData ;
+struct String_handle ;
+struct virtual_smat ;
+struct Vector  ;
+class Text_stream;
+class Data_file ;
+struct Text_db;
+#endif // FPROTO_HH
+
diff --git a/flower/interval.hh b/flower/interval.hh
new file mode 100644 (file)
index 0000000..950945c
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+  interval.hh -- part of flowerlib
+  
+  (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef INTERVAL_HH
+#define INTERVAL_HH
+
+#include <assert.h> 
+#include "real.hh"
+
+
+/// a Real interval
+struct Interval {
+    Real min, max;
+
+    void translate(Real t) {
+       min += t;
+       max += t;
+    }
+    Real operator[](int j) {
+       if (j==-1)
+           return min;
+       else if (j==1)
+           return max;
+       else
+           assert(false);
+           return 0.0;
+               
+    }
+    void unite(Interval h) {
+       if (h.min<min)
+           min = h.min;
+       if (h.max>max)
+           max = h.max;
+    }
+    Real length() const;
+    void set_empty() ;
+    bool empty() { return min > max; }
+    Interval() {
+       set_empty();
+    }
+    Interval(Real m, Real M) {
+       min =m;
+       max = M;
+    }
+    Interval &operator += (Real r) {
+       min += r;
+       max +=r;
+       return *this;
+    }
+};
+
+
+#endif // INTERVAL_HH
+
+
index ac9a12d0359da9250419cec8bef039da945c293b..523d54ee5fa758a4a8d4db63d486eefee4559d19 100644 (file)
@@ -2,7 +2,7 @@
    process command line, GNU style.
 
 
-   this is (Copyleft) 1996, Han-Wen Nienhuys, <hanwen@stack.urc.tue.nl>
+   this is (Copyleft) 1996, Han-Wen Nienhuys, <hanwen@stack.nl>
  */
 #include <stdio.h>
 #include <iostream.h>