]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.27
authorfred <fred>
Fri, 14 Feb 1997 22:58:02 +0000 (22:58 +0000)
committerfred <fred>
Fri, 14 Feb 1997 22:58:02 +0000 (22:58 +0000)
12 files changed:
flower/NEWS
flower/Sources.make
flower/Variables.make
flower/dstream.hh
flower/findcurs.hh [deleted file]
flower/findcurs.inl [deleted file]
flower/handle.hh
flower/iterate.hh
flower/tsmat.hh [deleted file]
flower/tsmat.tcc [deleted file]
flower/tvsmat.hh [deleted file]
flower/unionfind.hh

index 6f4fd129cd2aaaa005a5a48ef64726926e8c1dd4..b89a032048d24d2f41b51292bc67762d1eaa1c9f 100644 (file)
@@ -1,3 +1,6 @@
+pl 27
+       - (temporarily?) removed findcursor* t*mat*
+
 pl 26
        - docxx 3.0
 
index 1e4fb2bc02f7f4fad594abef5bff6cf73464fbf0..23d5164f0a9c99548e71cd1124229740f61390e1 100644 (file)
@@ -1,18 +1,13 @@
 
-cc=lgetopt.cc   string.cc dataf.cc textdb.cc unionfind.cc  \
-       smat.cc matrix.cc choleski.cc vector.cc dstream.cc\
-       matdebug.cc  scalar.cc path.cc
+cc=choleski.cc dataf.cc dstream.cc lgetopt.cc matdebug.cc matrix.cc\
+path.cc scalar.cc smat.cc string.cc textdb.cc unionfind.cc vector.cc
 
-templatecc=cursor.tcc list.tcc tsmat.tcc plist.tcc interval.tcc\
+templatecc=cursor.tcc list.tcc plist.tcc interval.tcc\
        pcursor.tcc
 
-inl=findcurs.inl link.inl list.inl  cursor.inl plist.inl
-hh=cursor.hh pcursor.hh lgetopt.hh link.hh list.hh dstream.hh \
-       string.hh stringutil.hh varray.hh textdb.hh textstr.hh  assoc.hh\
-       findcurs.hh unionfind.hh compare.hh handle.hh matrix.hh\
-       smat.hh vsmat.hh  vector.hh  real.hh choleski.hh\
-       tsmat.hh tvsmat.hh plist.hh associter.hh fproto.hh\
-       interval.hh scalar.hh rational.hh iterate.hh\
-       path.hh
-       
-
+inl=link.inl list.inl  cursor.inl plist.inl
+hh=assoc.hh associter.hh choleski.hh compare.hh cursor.hh dstream.hh\
+fproto.hh handle.hh interval.hh iterate.hh lgetopt.hh link.hh list.hh\
+matrix.hh path.hh pcursor.hh plist.hh rational.hh real.hh scalar.hh\
+smat.hh string.hh stringutil.hh textdb.hh textstr.hh unionfind.hh\
+varray.hh vector.hh vsmat.hh
index 0dc6c79705610f0195050e2c525070d88ce71c06..6d0cec88bde3e83fe959ec39984e9449af1bdc46 100644 (file)
@@ -1,6 +1,6 @@
 MAJVER=1
 MINVER=0
-PATCHLEVEL=26
+PATCHLEVEL=27
 
 PACKAGENAME=flower
 
index 0143eb05104fa4490c07d1e077b70cc46cafd52b..801b166774a00515cbdc577575070a3c1a90f953 100644 (file)
@@ -1,4 +1,3 @@
-// debug_stream
 
 #ifndef DSTREAM_HH
 #define DSTREAM_HH
@@ -10,8 +9,7 @@ const char eol= '\n';
 template<class K,class V>
 struct Assoc;
 
-/// debug stream
- /**
+/**  debug stream. 
    a class for providing debug output of nested structures,
    with indents according to \{\}()[].
 
@@ -38,7 +36,7 @@ public:
     bool silence(String);
     
     /**
-      if rcfile == 0, then do not read any rc file
+      if rcfile == 0, then do not read any rc file.
       */
       
     Dstream(ostream *r, const char  * rcfile);
diff --git a/flower/findcurs.hh b/flower/findcurs.hh
deleted file mode 100644 (file)
index e46b64d..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-template<class T, class U>
-class FindCursor : public Cursor<T>
-{
-public:
-    FindCursor( List<T>& list, Link<T>* pointer = 0 );
-    FindCursor( const Cursor<T>& cursor );
-    
-    Cursor<T> operator =( const Cursor<T>& c );
-    FindCursor<T, U> find( const T& thing );
-};
-
-#include "findcurs.inl"
diff --git a/flower/findcurs.inl b/flower/findcurs.inl
deleted file mode 100644 (file)
index 593d4aa..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-template<class T, class U>
-inline
-FindCursor<T, U>::FindCursor( List<T>& list, Link<T>* pointer ) : 
-    Cursor<T>( list, pointer )
-{
-}
-
-template<class T, class U>
-inline
-FindCursor<T, U>::FindCursor( const Cursor<T>& cursor ) :
-    Cursor<T>( cursor )
-{
-}
-
-template<class T, class U>
-Cursor<T>
-FindCursor<T, U>::operator =( const Cursor<T>& c )
-{   
-    ( (Cursor<T>&)*this ) = c;
-    return *this;
-}
-
-template<class T, class U>
-inline FindCursor<T, U>
-FindCursor<T, U>::find( const T& thing )
-{
-    Cursor<T> c( *this );
-    while( c.forward() )
-       {
-       T& look = *c;
-       if ( U::equal( look, thing ) )
-           return c;
-       c++;
-       }
-
-    return FindCursor( *this ); // cursor is not .ok()
-}
index 921dc6031c4a1d77e7f55dc15da3f3cdd89c894b..63c17ef1d2eec8e58d7f8814a17afbd86c0a7a9b 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef HANDLE_HH
 #define HANDLE_HH
+
 /// reference counting handle
 template<class T>
 class Handle {
index 33dbb16a4cc732b1ae0901e4072d305eaab04728..1e924f0790d6ac8bdc55a64ff693f9272fcfeb72 100644 (file)
@@ -1,3 +1,16 @@
+/*
+  iterate.hh -- define some list macros
+
+  source file of the flowerlib
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef ITERATE_HH
+#define ITERATE_HH
+
+
 
 #define iterator(set)          typeof((set).top())
 #define iterator_bot(set)              typeof((set).bottom())
@@ -6,3 +19,4 @@
 #define iter_top(set,var)      iterator(set) var(set)
 #define iter_bot(set,var)      iterator(set) var(set.bottom())
 
+#endif // ITERATE_HH
diff --git a/flower/tsmat.hh b/flower/tsmat.hh
deleted file mode 100644 (file)
index e8dac44..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-#ifndef SMAT_HH
-#define SMAT_HH
-#include "varray.hh"
-#include "vsmat.hh"
-
-/// simplest matrix storage. refer to its baseclass for the doco.
-template<class T>
-class Full_storage : public virtual_smat<T>
-{
-    /// height, width
-    int h,w;
-    /// maxima.
-    int maxh, maxw;
-    
-    /// the storage
-    T** els;
-    void
-    init() {
-       els=0;
-       h=w=maxh=maxw=0;
-
-    }
-    
-    bool valid(int i, int j) const {
-       return (i>=0 && i < h)
-           && (j < w && j >=0);
-    }
-    
-
-    void resize_rows(int);
-    void resize_cols(int);
-
-public:
-    virtual int rows() const {
-       return h;
-    }
-    virtual int cols() const {
-       return w;
-    }
-    
-    
-    virtual void set_size(int i, int j)
-    {
-       resize(i,j); //this could be more efficient.
-    }
-    
-    virtual void set_size(int i) {
-       set_size(i,i);
-    }
-    virtual void resize(int i, int j);
-    virtual void resize(int i) {
-       resize(i,i);
-    }
-    
-    virtual T& elem(int i,int j) {
-       assert(valid(i,j));
-       return els[i][j];
-    }
-    virtual const T& elem(int i, int j) const {
-       assert(valid(i,j));
-       return els[i][j];
-    }
-    virtual Array<T> row(int i) const;
-    virtual Array<T> column(int j) const;
-
-    Full_storage() {
-       init();
-    }
-    Full_storage(int i, int j) {
-       init();
-       set_size(i,j);
-    }
-    Full_storage(int i) {
-       init();
-       set_size(i);
-    }
-    void OK() const;
-    void operator=(Full_storage const &);
-    
-    virtual void insert_row(int k);
-    virtual void delete_row(int k);
-
-    
-    ~Full_storage();
-    virtual bool mult_ok(int i, int j)const;
-    virtual void mult_next(int &i, int &j) const ;
-    virtual bool trans_ok(int i, int j) const;
-    virtual void trans_next(int &i, int &j) const;
-
-};
-
-#endif
diff --git a/flower/tsmat.tcc b/flower/tsmat.tcc
deleted file mode 100644 (file)
index 0e5407a..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-#include "smat.hh"
-
-template<class T>
-void
-Full_storage<T>::operator=(Full_storage const &fs)
-{
-    resize(fs.h, fs.w);
-    for (int i=0; i<h; i++)
-       for (int j=0; i<w; j++)
-           els[i][j]= fs.els[i][j];
-}
-
-template<class T>
-void
-Full_storage<T>::OK() const
-{
-    assert(maxh >= h && maxw >= w);
-    assert(h >= 0 && w >= 0);
-}
-template<class T>
-void
-Full_storage<T>::resize_cols(int newh)
-{
-    if (newh <= maxh) {
-       h=newh;
-       return;
-    }
-   
-    T** newa=new T*[newh];
-    int j=0;
-    for (; j < h; j++)
-       newa[j] = els[j];
-    for (; j < newh; j++)
-       newa[j] = new T[w];
-    delete[] els;
-    els=newa;
-    maxh = newh;
-}
-
-template<class T>
-void
-Full_storage<T>::resize_rows(int neww)
-{
-    if (neww <= maxw) {
-       w=neww;
-       return;
-    }
-    for (int i=0; i < h ; i++) {
-       T* newa=new T[neww];
-       for (int k=0; k < w; k++)
-           newa[k] = els[i][k];
-
-       delete[] els[i];
-       els[i] = newa;
-       maxw = neww;
-    }
-}
-
-template<class T>
-Full_storage<T>::~Full_storage() {
-    for (int i=0; i < maxh; i++)
-       delete [] els[i];
-    delete[] els;
-}
-
-template<class T>
-void
-Full_storage<T>::resize(int i, int j)
-{
-    resize_cols(i);
-    resize_rows(j);
-}
-
-template<class T>
-void
-Full_storage<T>::set_size(int i, int j)
-{    
-    resize(i,j)
-}
-
-template<class T>
-bool
-Full_storage<T>::mult_ok(int i, int j) const
-{
-    return valid(i,j);
-}
-
-template<class T>
-bool
-Full_storage<T>::trans_ok(int i, int j) const
-{
-       return valid(i,j);
-} 
-
-
-template<class T>
-void
-Full_storage<T>::trans_next(int &i, int &j) const
-{
-    assert(trans_ok(i,j));
-    i++;
-    if (i >= h) {
-       i=0;
-       j ++;
-    }
-}
-
-template<class T>
-void
-Full_storage<T>::mult_next(int &i, int &j) const
-{
-    assert(mult_ok(i,j));
-    j++;
-    if (j >= w) {
-       j=0;
-       i++;
-    }
-}
-
-template<class T>
-void
-Full_storage<T>::delete_row(int k)
-{
-    assert(0 <= k <h);
-    for (int i=h-1; i > k ; i++)
-       for (int j=0; j < w; j++)
-           els[i-1][j]=els[i][j];
-}
-
-template<class T>
-void
-Full_storage<T>::insert_row(int k)
-{
-    assert(0 <= k <=h);
-    resize_cols(h+1);
-    for (int i=h-1; i > k ; i++)
-       for (int j=0; j <w; j++)
-           els[i][j]=els[i-1][j];
-}
-
-/****************************************************************/
-
-template<class T>
-virtual_smat<T> *
-virtual_smat<T>::get_full(int n, int m)
-{
-    return new Full_storage<T>(n,m);
-}
-#include "real.hh"
-
-template Full_storage<Real>;
diff --git a/flower/tvsmat.hh b/flower/tvsmat.hh
deleted file mode 100644 (file)
index 847c650..0000000
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef VSMAT_HH
-#define VSMAT_HH
-#include "varray.hh"
-
-/// a  matrix storage baseclass.
-/** base class for interface with matrix storageclasses.  There are no
-    iterators for matrixclasses, since matrices are (like arrays)
-    explicitly int-indexed.
-
-    Iteration is provided by *_next, *_ok, which update and check both
-    index variables simultaneously.
-
-    TODO
-    determine type of product matrix.
-
-*/
-class virtual_smat {
-    
-
-public:
-    /// check invariants
-    virtual void OK() const=0;
-    
-    /// height of matrix
-    virtual int rows() const = 0;
-
-    /// width of matrix
-    virtual int cols() const = 0;
-    
-    /// set the size. contents lost
-    /**      
-      PRE
-      i >=0, j>=0
-    */
-    virtual void set_size(int i, int j) = 0;
-    
-    /// set the size to square dimen. contents lost
-    virtual void set_size(int i) = 0;
-    /**
-      PRE
-      i>=0
-    */
-    /// set the size to i,j 
-    /**
-
-      keep contents. If enlarged contents unspecified
-        
-      PRE
-      i>=0, j>=0
-    
-    */
-    virtual void resize(int i, int j) = 0;
-
-    /// set the size to square dimen. contents kept
-    /**    
-    Keep contents. If enlarged contents are unspecified
-    
-    PRE
-    i>=0  
-    */
-    virtual void resize(int i) = 0;
-    
-    /// access an element
-    /**
-    access an element.
-
-    Generate an errormessage, if this happens
-    in the 0-part of a sparse matrix.
-    */
-
-    virtual Real& elem(int i,int j) = 0;
-    /// access a element, no modify
-    virtual const Real& elem(int i, int j) const = 0;
-
-#if 1
-    virtual Array<Real> row(int i) const = 0;
-    virtual Array<Real> column(int j) const = 0;
-#endif
-
-    /// add a row
-    /**
-    add a row to the matrix before  row k. Contents
-    of added row are unspecified
-
-      0 <= k <= rows()
-    */
-  virtual void insert_row(int k)=0;
-  
-    /// delete a row 
-          /**
-      delete a row from this matrix.
-
-      PRE
-      0 <= k < rows();
-    */virtual void delete_row(int k)=0;
-
-    virtual ~virtual_smat() { }
-    virtual virtual_smat *clone()=0;
-
-
-    /// is there a next?
-      /**
-      at end of matrix? when doing loop
-
-      for(i=0; i<h; i++)
-        for(j=0; j<w; j++)
-          ...
-
-    */ virtual bool mult_ok(int i, int j) const=0;
-    /// iterate
-       /**
-      walk through matrix (regular multiply)
-      get next j for row i, or get next row i and reset j.
-      this will make sparse matrix implementation easy.
-    
-      PRE
-      mult_ok(i,j)
-     */virtual void mult_next(int &i, int &j) const  = 0;
-  /**
-      valid matrix entry. return false if at end of row
-    */
-    virtual bool trans_ok(int i, int j) const=0;
-   
-    /**
-      walk through matrix (transposed multiply).
-      Get next i (for column j)
-    
-      PRE
-      ver_ok(i,j)
-     */
-    virtual void trans_next(int &i, int &j) const  = 0;
-
-    /// generate a "Full_storage" matrix    
-    virtual_smat<Real> *get_full(int n, int m);
-
-};
-    
-
-#endif
index 523321ff5f9774046a0aa61682225c3527c749de..fbaa51e7318f57e186962f209d48cc918eacf656 100644 (file)
@@ -2,7 +2,16 @@
 #define UNIONFIND_HH
 #include "varray.hh"
 
-/// which points of a graph are connected?
+/*
+    which points of a graph are connected?.
+    Union find, a standard algorithm:
+
+    Union_find represents an undirected graph of N points. You can
+    connect two points using #connect()#. #find(i)# finds a uniquely
+    determined representant of the equivalence class of points
+    connected to #i#.
+    
+    */
 struct Union_find {    
     void connect(int i, int j);
     int find(int i);
@@ -13,13 +22,4 @@ private:
     Array<int> classes;
 
 };
-/*
-    Union find, a standard algorithm:
-
-    Union_find represents an undirected graph of N points. You can
-    connect two points using #connect()#. #find(i)# finds a uniquely
-    determined representant of the equivalence class of points
-    connected to #i#.
-    
-    */
 #endif