]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.27
authorfred <fred>
Fri, 14 Feb 1997 22:40:06 +0000 (22:40 +0000)
committerfred <fred>
Fri, 14 Feb 1997 22:40:06 +0000 (22:40 +0000)
flower/choleski.hh
flower/interval.hh
flower/lgetopt.hh
flower/matrix.hh
flower/path.cc
flower/scalar.hh
flower/stringutil.hh
flower/textdb.hh
flower/vsmat.hh

index 14cf5e2326d8f4bbdf2fae00faaa87d13921a70d..f5e9fb4f5a36be596f3b44f1d9cb0306c0e1f050 100644 (file)
@@ -4,7 +4,8 @@
 #include "matrix.hh"
 
 /**
-    structure for using the LU decomposition of a positive definite .
+  Choleski decomposition of a matrix
+    structure for using the LU decomposition of a positive definite matrix.
 
     #P# is split  into
 
@@ -17,22 +18,23 @@ struct Choleski_decomposition {
 
     /// diagonal 
     Vector D;
-    ///Create decomposition of P
-    /**
+
+    /** Create decomposition of P. 
     PRE
     P needs to be symmetric positive definite
     */
     
     Choleski_decomposition(Matrix P);
-    Vector solve(Vector rhs) const;
-        /**
+
+    /**
     solve Px = rhs
     */
-Vector operator * (Vector rhs) const { return solve (rhs); }
+    Vector solve(Vector rhs) const;
+
+    Vector operator * (Vector rhs) const { return solve (rhs); }
   /**
     return the inverse of the matrix P.
     */
-
     Matrix inverse() const;
     /**
     return P,  calc'ed from L and D
index 9cff84fb3cc65d01d3377cd87840bd77a86dcde9..aae16381dbef62ed5133b332d49714d8260b5070 100644 (file)
@@ -12,8 +12,7 @@
 #include "real.hh"
 
 
-/// a T interval
-/**
+/**  a T interval. 
   this represents the closed interval [left,right].
   No invariants. T must be a totally ordered ring
   */
@@ -73,16 +72,16 @@ struct Interval_t {
     bool elt_q(T r);
 };
 
-/// partial ordering
-template<class T>
-int Interval__compare(const Interval_t<T>&,Interval_t<T> const&);
+
 /**
   inclusion ordering. Crash if not comparable.
   */
+template<class T>
+int Interval__compare(const Interval_t<T>&,Interval_t<T> const&);
 
-/****************************************************************
+/*
   INLINE
- ****************************************************************/
+ */
 
 #include "compare.hh"
 
index 67deb700bc703fd24e17ed14849ee75d2c3c08ba..31fb2c55ebe609b4d9e778f45b417f450577d83f 100644 (file)
@@ -15,9 +15,9 @@ struct long_option_init {
 };
 
 
-///  C++ for version of long_getopt.
-/** For processing GNU style command line arguments.  No pointer
-  (return values, arguments) contents are copied.  */
+/** C++ for version of long_getopt.  For processing GNU style command
+  line arguments.  No pointer (return values, arguments) contents are
+  copied.  */
 class Getopt_long {
 public:
     /** errorcodes: no error, argument expected, no argument expected,
@@ -48,8 +48,7 @@ private:
     /// report an error and abort
     void report(Errorcod c);
 public:
-    /// what to do with  errors
-    /**
+    /**  what to do with  errors. 
        report messages on  #*os#, and abort.
        if #os# is null, then do not report nor abort, just set #error#
       */
@@ -73,8 +72,7 @@ public:
     /// construct: pass arguments and option info.
     Getopt_long(int c,  char **v, long_option_init *lo);
 
-    /// get the next option
-    /**
+    /**  get the next option. 
       @return pointer to next option found.
       0 if error occurred, or next argument is no option.
       */
index 73a9f0487e5a221e7207705a082001409417d71e..a633d6657a853946fed30b2f42e1c1e36b71c2f2 100644 (file)
@@ -5,8 +5,7 @@
 #include "vsmat.hh"
 #include "vector.hh"
 
-/// a Real matrix
-/** This is a class for a nonsquare block of #Real#s.  The
+/**  a Real matrix.  This is a class for a nonsquare block of #Real#s.  The
     implementation of sparse matrices is done in the appropriate #smat#
     class. Matrix only does the mathematical actions (adding,
     multiplying, etc.)
@@ -24,9 +23,8 @@ public:
     int cols() const { return dat->cols(); }
     int rows() const { return dat->rows(); }
 
-    /// return the size of a matrix
-    /**
-      @pre
+    /**  return the size of a matrix. 
+      PRE
       the matrix needs to be square.
     */
     int dim() const;
@@ -49,8 +47,7 @@ public:
     void operator*=(Real a);
     void operator/=(Real a) { (*this) *= 1/a; }
     
-    /// add a row
-    /**
+    /**  add a row. 
       add a row to the matrix before  row k
 
       PRE
@@ -58,8 +55,7 @@ public:
       0 <= k <= rows()
     */
     void insert_row(Vector v,int k);
-    ///
-    /**
+    /** . 
       delete a row from this matrix.
 
       PRE
@@ -107,15 +103,13 @@ public:
     Matrix transposed() const ;
 
     Real norm() const;
-    /// swap
-    /**
+    /**  swap. 
       PRE
       0 <= c1,c2 < cols()
     */
     void swap_columns(int c1, int c2);
 
-    /// swap
-    /**
+    /**  swap. 
       PRE
       0 <= c1,c2 < rows()
     */
index 2737d1cd154173d19d293971d493af9d0bb75f07..3dc38366f26405fa583c5def9d921f6dca61e27d 100644 (file)
@@ -9,8 +9,8 @@
 #endif
 
 /**
-   INPUT: path the original full filename
-   OUTPUT: 4 components of the path. They can be empty
+   @param path the original full filename
+   @return 4 components of the path. They can be empty
 */
 void
 split_path(String path, 
@@ -56,8 +56,7 @@ File_path::File_path(String pref)
 }
 
 
-///find a file
-/**
+/** find a file. 
   It will search in the current dir, in the construction-arg, and
   in any other added path, in this order.
   */
index 0213a92f0d9013df8116769c2499da8c348ce9f5..5cdfa427da053134f4db86358991558226611a63 100644 (file)
@@ -23,8 +23,8 @@ struct Scalar : public String {
     bool isnum();
     operator Real();
     operator int();
-    ///
-    /** perl -like string to bool conversion
+
+    /**   perl -like string to bool conversion.
      */
     operator bool() const;
 
index 6a7feb126ab44e17e985cae8672944f521759d1b..2f62caee3d73564cd41bdaf0863680071b897243 100644 (file)
@@ -9,8 +9,7 @@
 const INITIALMAX=8;
 class String_handle;
 
-/// Internal String struct
-/**
+/**  Internal String struct. 
    the data itself. Handles simple tasks (resizing, resetting)
    */
 
@@ -145,8 +144,8 @@ friend class String_handle;
        length = j;
     }
 
-    /** not really safe. Can alter length without StringData knowing it.
-      */
+    /** access a char. not really safe. Can alter length without
+      *StringData knowing it. */
     char &operator [](int j) {
        assert(j >= 0 && j <= length);
        return string[j] ; 
@@ -160,8 +159,7 @@ friend class String_handle;
 
 
 
-/// ref. counting for strings
-/**
+/**  ref. counting for strings. 
    handles ref. counting, and provides a very thin
    interface using char *
  */
index cdc889853936e6b3cec33ef29e4cc33f02bd9da1..3586c0d180628fd611e3f99ef4a02e22592afa33 100644 (file)
@@ -3,8 +3,8 @@
 
 #include "textstr.hh"
 
-/** do "#" comments, read quote enclosed  fields */
-/// a "const" Array. Contents can't be changed.
+/**a "const" Array. Contents can't be changed. do "#" comments, read quote enclosed  fields */
+
 class Text_record : Array<String>  
 {
     int line_no;
@@ -27,10 +27,10 @@ public:
     Array<String>::size;           
 };
 
-/**
+/** abstraction for a datafile.
     add a subrec/fieldsep/record separator
     */
-/// abstraction for a datafile
+
 class Text_db : private Data_file
 {
     void gobble_leading_white();
index 8765cbfe9491aa3e3926ddb8cf2a29ebe7bab29d..283b1e567b524375a4d17926475cd93229aa9bf7 100644 (file)
@@ -2,7 +2,17 @@
 #define VSMAT_HH
 #include "varray.hh"
 #include "real.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 {
     
 
@@ -15,23 +25,20 @@ public:
 
     /// width of matrix
     virtual int cols() const = 0;
-    
-    /// set the size. contents lost
-    /**      
+      
+    /**  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;
-    /**
+    /**set the size to square dimen. contents lost
       PRE
       i>=0
     */
-    /// set the size to i
-    virtual void resize(int i, int j) = 0;
-    /**
+    virtual void set_size(int i) = 0;
+     /**set the size to i.
 
       keep contents. If enlarged contents unspecified
         
@@ -39,25 +46,27 @@ public:
       i>=0, j>=0
     
     */
-
-    /// set the size to square dimen. contents kept
-    virtual void resize(int i) = 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
-    virtual Real& elem(int i,int j) = 0;
-    /**
+        /**
     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;
 
@@ -66,53 +75,54 @@ public:
     virtual Array<Real> column(int j) const = 0;
 #endif
 
-    /// add a row
-    virtual void insert_row(int k)=0;
+    
     /**
     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 
-    virtual void delete_row(int k)=0;
+    
       /**
       delete a row from this matrix.
 
       PRE
       0 <= k < rows();
     */
+    virtual void delete_row(int k)=0;
         virtual void delete_column(int k)=0;
     virtual ~virtual_smat() { }
     virtual virtual_smat *clone()=0;
 
 
-    /// is there a next?
-    virtual bool mult_ok(int i, int j) const=0;
+    
     /**
-      at end of matrix? when doing loop
+      at end of matrix?. when doing loop
 
       for(i=0; i<h; i++)
         for(j=0; j<w; j++)
-          ...
+          ..
 
     */
-    /// iterate
-    virtual void mult_next(int &i, int &j) const  = 0;
+    virtual bool mult_ok(int i, int j) const=0;
+
     /**
-      walk through matrix (regular multiply)
+      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 bool trans_ok(int i, int j) const=0;
-    /**
+    virtual void mult_next(int &i, int &j) const  = 0;
+
+/**
       valid matrix entry. return false if at end of row
     */
-    virtual void trans_next(int &i, int &j) const  = 0;
+    virtual bool trans_ok(int i, int j) const=0;
+
     /**
       walk through matrix (transposed multiply).
       Get next i (for column j)
@@ -121,21 +131,11 @@ public:
       ver_ok(i,j)
      */
 
+    virtual void trans_next(int &i, int &j) const  = 0;
     /// generate a "Full_storage" matrix    
     static virtual_smat *get_full(int n, int m);
 
 };
     
-/** 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.
-
-*/
 
 #endif