From: fred Date: Thu, 28 Nov 1996 11:02:01 +0000 (+0000) Subject: flower-1.0.8 X-Git-Tag: release/1.5.59~6744 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=443af724c14462f3d070de99b4a4811447da53f9;p=lilypond.git flower-1.0.8 --- diff --git a/flower/README b/flower/README new file mode 100644 index 0000000000..d33c68f3df --- /dev/null +++ b/flower/README @@ -0,0 +1,10 @@ +This library contains some general purpose routines which aren't +standardised yet. It was written by: + + Han-Wen Nienhuys + +and + + Jan Nieuwenhuizen + +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 index 0000000000..5241a13dd0 --- /dev/null +++ b/flower/fproto.hh @@ -0,0 +1,38 @@ +/* + fproto.hh -- typenames in flowerlib + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef FPROTO_HH +#define FPROTO_HH + +template struct svec; +template struct sstack; +template struct Assoc; +template struct List; +template struct PointerList; +template struct IPointerList; +template struct Cursor; +template struct PCursor; +template struct Link; +template 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 index 0000000000..950945ca87 --- /dev/null +++ b/flower/interval.hh @@ -0,0 +1,58 @@ +/* + interval.hh -- part of flowerlib + + (c) 1996 Han-Wen Nienhuys +*/ + +#ifndef INTERVAL_HH +#define INTERVAL_HH + +#include +#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.minmax) + 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 + + diff --git a/flower/lgetopt.cc b/flower/lgetopt.cc index ac9a12d035..523d54ee5f 100644 --- a/flower/lgetopt.cc +++ b/flower/lgetopt.cc @@ -2,7 +2,7 @@ process command line, GNU style. - this is (Copyleft) 1996, Han-Wen Nienhuys, + this is (Copyleft) 1996, Han-Wen Nienhuys, */ #include #include