]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.30
authorfred <fred>
Sun, 24 Mar 2002 19:30:54 +0000 (19:30 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:30:54 +0000 (19:30 +0000)
46 files changed:
hdr/beam.hh
hdr/break.hh
hdr/clefitem.hh
hdr/grouping.hh
hdr/inputcommands.hh
hdr/inputmusic.hh
hdr/inputscore.hh
hdr/inputstaff.hh
hdr/item.hh
hdr/key.hh
hdr/keyitem.hh
hdr/lexer.hh
hdr/linespace.hh
hdr/localkeyitem.hh
hdr/lyricitem.hh
hdr/lyricwalker.hh
hdr/meter.hh
hdr/molecule.hh
hdr/notehead.hh
hdr/paper.hh
hdr/pcol.hh
hdr/qlp.hh
hdr/qlpsolve.hh
hdr/request.hh
hdr/rest.hh
hdr/sccol.hh
hdr/scoreline.hh
hdr/script.hh
hdr/scriptdef.hh
hdr/sourcefile.hh
hdr/spanner.hh
hdr/staffcommands.hh
hdr/staffelem.hh
hdr/staffline.hh
hdr/staffwalker.hh
hdr/stem.hh
hdr/textdef.hh
hdr/textitem.hh
hdr/timedescription.hh
hdr/voice.hh
src/molecule.cc
src/notename.cc
src/qlp.cc
src/qlpsolve.cc
src/tstream.cc
src/voice.cc

index 68a9f49cff95f8badba13ea4c52a772615613657..68f5087f459c884a16443657b78afee8cc469dcd 100644 (file)
 #include "directionalspanner.hh"
 #include "plist.hh"
 
-/// a beam connects multiple stems 
+/** a beam connects multiple stems Beam adjusts the stems its owns to
+make sure that they reach the beam and that point in the correct
+direction */
 struct Beam:  public Directional_spanner {
     PointerList<Stem*> stems;
     Real slope;
     Real left_pos;
-    /// dir: -1 below heads, +1 above heads.
+   
 
-    /****************/
+    /* *************** */
     const char * name() const;
     
     virtual Interval width()const;    
@@ -41,8 +43,6 @@ private:
     void solve_slope();
     Molecule*brew_molecule_p()const;
 };
-/** Beam adjusts the stems its owns to make sure that they reach the
-  beam and that point in the correct direction */
 
 #endif // BEAM_HH
 
index 9ecb484e5b156d253db8aee2f87f3bfa03118015..7d17470228d7a59756f25a1e6a9a91aae358f377 100644 (file)
@@ -14,7 +14,7 @@ struct Break_algorithm {
     PScore &pscore_;
     Real linelength;
 
-    /****************/
+    /* *************** */
 
     Break_algorithm(PScore&);
 
index c07087e0734e59f029ccd7f3b24a1e0a942035e9..b7ea93caaa8e5453b416ea8ea210399973748a4c 100644 (file)
@@ -17,7 +17,7 @@ struct Clef_item : Item {
     bool change;
 
 
-    /****************/
+    /* *************** */
 
     Clef_item();
     void read(Clef);
index aea2fd393f5f48bedd115e6292d4449cff649992..70d95ef55d1f74d2ada3ee4d5cfb002b13d4570e 100644 (file)
 
 typedef Interval_t<Moment> MInterval;
 
-/// data structure which represents rhythmic units 
+/** data structure which represents rhythmic units   this is a tree. It groupes notes according to rules
+ */
 struct Rhythmic_grouping {
     Array<Rhythmic_grouping*> children;
     MInterval *interval_;
     
-    /****************/
+    /* *************** */
 
     Array<MInterval> intervals();
     MInterval interval()const;
@@ -51,9 +52,4 @@ private:
     void junk();
     void copy(Rhythmic_grouping const&);
 };
-/**
-  this is a tree. It groupes notes according to rules
-  
- */
-
 #endif
index bd6054f6e9d84ff6f84b52a08fc32d884a7b3f07..d40885407afd8e074cf54e739ca56b69d02f4035 100644 (file)
@@ -16,7 +16,7 @@
 struct Commands_at : public IPointerList<Input_command*> {
     Time_description tdescription_;
     
-    /****************/
+    /* *************** */
 
     Moment when();
     void parse(Staff_commands_at*);
@@ -30,7 +30,7 @@ struct Commands_at : public IPointerList<Input_command*> {
 
 struct Input_cursor : public PCursor<Commands_at*>
 {
-    /****************/
+    /* *************** */
     Input_cursor(PCursor<Commands_at*>);
     Moment when()const;
     void find_moment(Moment w);
@@ -42,7 +42,7 @@ struct Input_cursor : public PCursor<Commands_at*>
 struct Input_commands : public IPointerList<Commands_at*> {    
     Input_cursor ptr;
     
-    /****************/
+    /* *************** */
 
     void find_moment(Moment);
     void add(Input_command c,Assoc<String,Moment> &marks_assoc_r);
index 7d0dd618ba819c6ee7e3442ede9bff0d12287688..0a1d95cfc6ee7baf8e4ff101d9efd28194bf7e47 100644 (file)
@@ -16,7 +16,18 @@ struct Voice_list : public PointerList<Voice*> {
     void translate_time(Moment dt);
 };
 
-/// ABC for input structures
+/**
+
+  Input_music is anything that can simply be regarded as/converted to
+  a set of voices "cooperating" or independant. It has some basic
+  characteristics that real music has too:
+
+  - it is rhythmic (it has a length, and can be translated horizontally)
+  - a pitch (it can be transposed)
+
+  */
+
+
 struct Input_music {
     virtual Voice_list convert()const=0;
     virtual Moment length()const=0;
@@ -30,23 +41,12 @@ struct Input_music {
     virtual Input_music *clone() const = 0;
     virtual Simple_music *simple() { return 0; }
 };
-/**
-
-  Input_music is anything that can simply be regarded as/converted to
-  a set of voices "cooperating" or independant. It has some basic
-  characteristics that real music has too:
-
-  - it is rhythmic (it has a length, and can be translated horizontally)
-  - a pitch (it can be transposed)
-
-  */
-
 
 /// Simple music consists of one voice
 struct Simple_music : Input_music {
     Voice voice_;
 
-    /****/
+    /* *** */
     virtual Simple_music*simple() { return this; }  
     void add(Voice_element*);
     virtual void set_default_group(String g) { voice_.set_default_group(g); }
@@ -63,7 +63,7 @@ struct Simple_music : Input_music {
 /// Complex_music consists of multiple voices
 struct Complex_music : Input_music {
     IPointerList<Input_music*> elts;
-    /****************/
+    /* *************** */
     virtual void set_default_group(String g);
     void add(Input_music*);
     Complex_music();
@@ -73,11 +73,19 @@ struct Complex_music : Input_music {
  
 };
 
-/// multiple stuff  after each other
+
+/**
+  voice like.
+
+  different music forms which start after each other ( concatenated,
+  stacked "horizontally )
+ */
+
 struct Music_voice : Complex_music {
  
     
-    /****************/
+    /* *************** */
     Moment length()const;
     virtual void translate_time(Moment dt);
     virtual Voice_list convert()const;
@@ -87,19 +95,18 @@ struct Music_voice : Complex_music {
     }
     virtual void print() const ;
 };
-/**
-  voice like.
 
-  different music forms which start after each other ( concatenated,
-  stacked "horizontally )
- */
+/**
+  Multiple musicstuff stacked on top of each other
+  chord like :
 
-/// Multiple musicstuff stacked on top of each other
+  - different music forms which start at the same time ( stacked "vertically" )
+  
+  */
 struct Music_general_chord : Complex_music {
 
 
-    /****************/
+    /* *************** */
 
     virtual Moment length()const;
     virtual Voice_list convert()const;
@@ -111,12 +118,6 @@ struct Music_general_chord : Complex_music {
     
     virtual void print() const ;
 };
-/**
-  chord like :
-
-  - different music forms which start at the same time ( stacked "vertically" )
-  
-  */
 
 struct Multi_voice_chord : Music_general_chord {
     void set_default_group(String);
index 94ff0458147ad44e01ee56c0a942172dc2105fa6..ef0d9d6a889f9763577cbe92dc093ae7555a1975 100644 (file)
@@ -17,7 +17,7 @@ struct Input_score {
     IPointerList<Input_staff*> staffs_;
     IPointerList<Input_command*> commands_;
     
-    /****************************************************************/
+    /* *************************************************************** */
     Input_score();
     Input_score(Input_score const&);
     void add(Array<Input_command*> &s);
@@ -28,7 +28,5 @@ struct Input_score {
     void print() const;
     Score*parse();
 };
-/**
-        
-    */
+
 #endif
index 647ffaf8a5829676af83dd0aaa9362a617bef14c..c1252ad01d21df2d0bf716f67e32c22ca2a95830 100644 (file)
@@ -20,7 +20,7 @@ struct Input_staff {
     IPointerList<Input_command*> commands_;
     IPointerList<Input_music*> music_;
 
-    /****************/
+    /* *************** */
 
     void add(Input_music*m);
     Input_staff(Input_staff const&);
index 68f1402c5b84d62191d60278299ecfad3c601e1a..e934f279f7374a639b8c0d47d34270c5727bb952 100644 (file)
@@ -6,24 +6,27 @@
 #include "string.hh"
 #include "staffelem.hh"
 
-/// a horizontally fixed size element of the score
+/**
+ a horizontally fixed size element of the score
+
+  Item is the datastructure for printables whose width is known
+  before the spacing is calculated
+
+  NB. This doesn't mean an Item has to initialize the output field before
+  spacing calculation. 
+  
+*/
+
 struct Item : Staff_elem {
     /// indirection to the column it is in
     PCol * pcol_l_;
 
-    /****************/
+    /* *************** */
     virtual Item *item() { return this; }
     Item();
     void do_print()const;
     const char*name()const;
 };
-/** Item is the datastructure for printables whose width is known
-  before the spacing is calculated
-
-  NB. This doesn't mean an Item has to initialize the output field before
-  spacing calculation. 
-  
-*/
 
 
 #endif
index a0ea3e833d4ea58a2757a4c5f20357c29cd4fe03..fa41082fd87b0e0c911f7a8b51d3f8b9217c84af 100644 (file)
@@ -13,7 +13,7 @@
 class Key {
     Array<int> accidentals;
 
-    /****************/
+    /* *************** */
 
 public:
     Array<int> read(Array<Scalar> );
index 71a7dba2b1faa830e03d04e9d5514bdb426245b2..1d1d2e37f06ba1eae122d92ac4d927b9fe9fe4d3 100644 (file)
@@ -12,7 +12,7 @@
 
 struct Clef;
 
-/// 
+///   An item which places accidentals at the start of the line
 struct Keyitem : Item {
     const char * name() const;
     Array<int> pitch;
@@ -20,7 +20,7 @@ struct Keyitem : Item {
     int c_position;
 
     
-    /****************/
+    /* *************** */
     
     Keyitem(int cposition);
     void add(int pitch, int acc);
@@ -31,8 +31,5 @@ struct Keyitem : Item {
 
     Molecule* brew_molecule_p()const;
 };
-/**
-  An item which places accidentals at the start of the line
-  */
 
 #endif // KEYITEM_HH
index 9e5cf1b3039248ceaf2bff58da1c35f30bd33d2e..e2909d8879aa4daf1142802e0176e463ae531725 100644 (file)
@@ -33,7 +33,7 @@ struct My_flex_lexer : yyFlexLexer {
     Notename_tab * defaulttab;
     char const* data_ch_c_l_m;
     int errorlevel_i_;
-    /****************/
+    /* *************** */
     int ret_notename(int *p, String text, int octave_mod);    
     char const* here_ch_c_l();
     void set(Notename_tab *n);
index e23d334ca6345fc101d9ef46690363953bdc06fb..b9027754ce3bac7e58dca9a87511e85231584462 100644 (file)
@@ -13,7 +13,7 @@ struct Colinfo {
     const Real* fixpos;
     Interval width;
     
-    /****************/
+    /* *************** */
     Colinfo();
     void operator=(Colinfo const&);
     Colinfo(Colinfo const&);
@@ -27,7 +27,25 @@ struct Colinfo {
 };
 
 
-/// spacing for one line.
+/** the problem, given by the columns (which include constraints) and
+    intercolumn spacing. The problem is:
+
+    Generate a spacing which
+    \begin{itemize}
+    \item
+    Satisfies spacing constraints (notes can't be printed through each other)
+    \item
+    Looks good, ie tries to conform to  an ideal spacing as much as possible.
+    \end{itemize}
+    This is converted by regarding idealspacing as "springs" attached
+    to columns. The equilibrium of one spring is the ideal
+    distance. The columns have a size, this imposes "hard" constraints
+    on the distances. This transforms the problem into a quadratic
+    programming problem with linear constraints.
+
+    The quality is given by the total potential energy in the
+    springs. The lower the energy, the better the configuration.
+*/
 class Spacing_problem {
     Array<const Idealspacing*> ideals;
     Array<Colinfo> cols;
@@ -51,26 +69,28 @@ class Spacing_problem {
     void make_constraints(Mixed_qp& lp) const;
 
 public:
-    /// solve the spacing problem
+    /** solve the spacing problem
+          return the column positions, and the energy (last element)
+         */
     Array<Real> solve() const;
-    /**
-    return the column positions, and the energy (last element)
-    */
+
     /// add a idealspacing to the problem.
-    void add_ideal(const Idealspacing *i);
-    
     /**
+      
+      
     One pair of columns can have no, one or more idealspacings,
     since they can be "summed" if the columns to which #i# refers are
     not in this problem, the spacing is ignored.
     */
+    void add_ideal(const Idealspacing *i);
     
     
     /// add a col to the problem
-    void add_column(const PCol *, bool fixed=false, Real fixpos=0.0);
-    /** columns have to be added left to right. The column contains
+       /** columns have to be added left to right. The column contains
       info on it's minimum width.
     */
+    void add_column(const PCol *, bool fixed=false, Real fixpos=0.0);
 
 
     bool check_constraints(Vector v) const;
@@ -82,23 +102,4 @@ public:
 };
 
 
-/** the problem, given by the columns (which include constraints) and
-    intercolumn spacing. The problem is:
-
-    Generate a spacing which
-    \begin{itemize}
-    \item
-    Satisfies spacing constraints (notes can't be printed through each other)
-    \item
-    Looks good, ie tries to conform to  an ideal spacing as much as possible.
-    \end{itemize}
-    This is converted by regarding idealspacing as "springs" attached
-    to columns. The equilibrium of one spring is the ideal
-    distance. The columns have a size, this imposes "hard" constraints
-    on the distances. This transforms the problem into a quadratic
-    programming problem with linear constraints.
-
-    The quality is given by the total potential energy in the
-    springs. The lower the energy, the better the configuration.
-*/
 #endif
index 0da7e06858f368724f683872d82c1c17165b36a6..492a23f345eaad5f2c4b99bc30135bbe1dd91832 100644 (file)
@@ -20,7 +20,7 @@ struct Local_key_item : Item {
     Array<Item*> group;
     int c0_position;           // move into walker
 
-    /****************/
+    /* *************** */
     
     Local_key_item(int c0position);
     void add(Item*);
index 7fda46142ea804d8bd2c30ff7dbb0bdc7e3a2ea7..5dcd90c8897d20b8c0dc35006e5a0ecc3662de27 100644 (file)
@@ -9,7 +9,7 @@
 #include "textitem.hh"
   
 struct Lyric_item : Text_item {
-    /****************/
+    /* *************** */
     Lyric_item(Lyric_req* lreq_l, int voice_count_i);
     virtual void do_pre_processing();    
 };
index 870efbb040e2dcc96fb913217421f6a538d094e4..fcf0c9186bd6481bc97b78dc27f7e241651ae9a9 100644 (file)
@@ -16,7 +16,7 @@ struct Lyric_item; // put into proto
 struct Lyric_walker: Staff_walker {
     Array<Lyric_item*> litem_l_array_;
 
-    /****************/
+    /* *************** */
     
     virtual void do_TYPESET_command(Command*);
     virtual void do_INTERPRET_command(Command*);
index 835b661bae2eb29c963d51668c773f50a0963505..22a256c93c74e2129e3d0799fc27a35de960cc5f 100644 (file)
@@ -12,7 +12,7 @@
 struct Meter: Item {
     const char * name() const;
     Array<Scalar> args;
-    /****************/
+    /* *************** */
     
     Meter(Array<Scalar> args) ;
     Molecule*brew_molecule_p() const;
index 9f20458fef68a156b285bbd8af9560b4c22e10f0..084321ce4e809be9a755ee93a95acad107f975f6 100644 (file)
@@ -11,7 +11,7 @@ struct Atom {
     Offset off;
     Symbol sym;
 
-    /****************/
+    /* *************** */
     
     void translate(Offset o) {
        off += o;
@@ -26,11 +26,13 @@ struct Atom {
     String TeXstring() const;
 };
 
-/// a group of #Atom#s
+
+/** a group of individually translated symbols. You can add molecules
+    to the top, to the right, etc.  */
 struct Molecule {
     IPointerList<Atom*> ats;   // change to List<Atom>? 
 
-    /****************/
+    /* *************** */
     
     Molecule() { }
     Molecule(Atom a) { add(a) ; }
@@ -52,6 +54,4 @@ struct Molecule {
 private:
     void operator=(const Molecule&);
 };
-/** a group of individually translated symbols. You can add molecules
-    to the top, to the right, etc.  */
 #endif
index 66bed0360e53de71b19d9833bd848dbc51192928..b3b7d3ad23b8b43c8e29f3b06def58b925a5a82d 100644 (file)
@@ -8,7 +8,15 @@
 #define NOTEHEAD_HH
 #include "item.hh"
 
-/// ball at the end of the stem
+/**
+ ball at the end of the stem
+takes care of:
+
+  * help lines  
+  * proper placing of dots 
+
+  */
+
 struct Notehead : Item {
     const char * name() const;
     const char* defined_ch_c_l_m; //sorry, trying to find error in martien.ly
@@ -21,24 +29,17 @@ struct Notehead : Item {
     int balltype;
     int x_dir;
     
-    /****************/
+    /* *************** */
     
     void set_rhythmic(Rhythmic_req *);
-    Notehead(int staff_size);
+
     /**
       position of top line (5 linestaff: 8)
       */
-
+    Notehead(int staff_size);
     void do_print()const;
     static int compare(Notehead*&a, Notehead*&b) ;
     Molecule* brew_molecule_p()const;
 };
-/**
-  takes care of:
-
-  * help lines  
-  * proper placing of dots 
-
-  */
 #endif // NOTEHEAD_HH
 
index 6da51df33e01000006c4aed17f7c640f82a9bc93..da9ebd12ed2f65a68d7f9991eb0f5af868fa217c 100644 (file)
@@ -3,7 +3,15 @@
 #include "string.hh"
 #include "moment.hh"
 
-/// symbols, dimensions and constants
+
+/** symbols, dimensions and constants
+
+  This struct takes care of all kinds of symbols, dimensions and
+ constants. Most of them are related to the point-size of the fonts,
+ so therefore, the lookup table for symbols is also in here.
+
+ see TODO
+ */
 struct Paperdef {
     Lookup *lookup_p_;
     String outfile;
@@ -16,7 +24,7 @@ struct Paperdef {
     /// ideal = geometric_ ^ log2(duration)
     Real geometric_;
     
-    /****************/
+    /* *************** */
     void reinit();
     Paperdef(Lookup*);
     void set(Lookup*);
@@ -30,9 +38,4 @@ struct Paperdef {
     void print() const;
     Real duration_to_dist(Moment);
 };
-/** This struct takes care of all kinds of symbols, dimensions and
- constants. Most of them are related to the point-size of the fonts,
- so therefore, the lookup table for symbols is also in here.
 
- see TODO
- */
index 1d3ff34ca849c02d56a8e58014df01abfebe0fc2..0e8ed3e6776002ec6b567805b8935eb5a4673960 100644 (file)
@@ -7,26 +7,34 @@
 #include "item.hh"
 
 /// stuff grouped vertically.
-struct PCol {
+/**
+    This is a class to address items vertically. It contains the data for:
+    \begin{itemize}
+    \item
+    unbroken score
+    \item
+    broken score
+    \item
+    the linespacing problem
+    \end{itemize}
+  */struct PCol {
     PointerList<const Item*> its;
     PointerList<const Spanner*> stoppers, starters;
     
 
     /// prebreak is put before end of line.
-    PCol *prebreak_p_;
     /**
     if broken here, then (*this) column is discarded, and prebreak
     is put at end of line, owned by Col
     */
+    PCol *prebreak_p_;
 
     /// postbreak at beginning of the new line
     PCol *postbreak_p_;
-    /**  \See{prebreak}
-    */
     
-    PCol *daddy_l_;
     /** if this column is pre or postbreak, then this field points to
      the parent.  */
+    PCol *daddy_l_;
     
     /// if lines are broken then this column is in #line#
     const Line_of_score *line_l_;
@@ -36,7 +44,7 @@ struct PCol {
 
     PScore * pscore_l_;
 
-    /****************/
+    /* *************** */
     /// which  one (left =0)
     int rank() const;
 
@@ -53,12 +61,12 @@ struct PCol {
     PCol(PCol * parent);
 
     /// which col comes first?
-    static int compare(const PCol &c1, const PCol &c2);
     /**
     signed compare on columns.
 
     return < 0 if c1 < c2.
-    */
+    */static int compare(const PCol &c1, const PCol &c2);
+    
 
     void OK() const;
     void set_breakable();
@@ -66,17 +74,7 @@ struct PCol {
 private:
     PCol(PCol const&){}
 };
-/**
-    This is a class to address items vertically. It contains the data for:
-    \begin{itemize}
-    \item
-    unbroken score
-    \item
-    broken score
-    \item
-    the linespacing problem
-    \end{itemize}
-  */
+
 
 #include "compare.hh"
 instantiate_compare(PCol &, PCol::compare);
index db5438499d6beaf75723159e637fcbe6ef8e369d..6e82aa9c40fa717135191392102abbaceafff6f8 100644 (file)
@@ -14,20 +14,19 @@ public:
     Vector lin;
     Real const_term;
 
-    ///
-    void assert_solution(Vector sol) const;
+
     /**
       use a KKT method to assert optimality of sol
       */
-    /// solve the problem using a projected gradient method
+     void assert_solution(Vector sol) const;
+  /// solve the problem using a projected gradient method
     Vector solve(Vector start) const;
     
+    /** return the number of variables in the problem */
     int dim() const{
        return lin.dim();
     }
-    /** return the number of variables in the problem */
-    ///
-    void add_inequality_cons(Vector c, double r);
+
     /**
       add a constraint
 
@@ -38,14 +37,15 @@ public:
       c.dim() == dim();
        
       */
-    ///
-    Ineq_constrained_qp(int novars);
+    void add_inequality_cons(Vector c, double r);
+    
     /** set up matrices to go with the problem. */
-
-    Real eval(Vector v);
+    Ineq_constrained_qp(int novars);
+    
     /**
     evaluate the quadratic function for input #v#
     */
+    Real eval(Vector v);
 
     void eliminate_var(int idx, Real value);
     void OK()const;
@@ -54,6 +54,15 @@ public:
 };
 
 /// Quadratic programming with mixed linear constraints
+/**
+  problem definition of a quadratic optimisation problem with linear
+  inequality and equality constraints
+
+
+    x^T QUAD x /2 + b^T x 
+*/
+
+
 class Mixed_qp :public Ineq_constrained_qp {
     Array<int> eq_cons;
     Array<Real> eq_consrhs;
@@ -65,8 +74,7 @@ public:
     Vector solve(Vector start) const;
     void add_fixed_var(int i , Real value);
     
-    ///
-    void add_equality_cons(Vector c, double r);
+
     /**
       add a constraint,
 
@@ -75,15 +83,6 @@ public:
       PRE
       c.dim()==dim();
      */
-
+    void add_equality_cons(Vector c, double r);
 };
-/**
-  problem definition of a quadratic optimisation problem with linear
-  inequality and equality constraints
-
-
-    x^T QUAD x /2 + b^T x 
-*/
-
-
 #endif
index b9789bfc4aac1f042b06b24b993210f7ad3e8271..aefcc767e7d75b3ec53d0205f0a1802c1252c635 100644 (file)
@@ -2,6 +2,18 @@
 #include "matrix.hh"
 
 
+/**
+    This class represents the set of active (binding) constraints
+    which can be active while the QLP algorithm is in a feasible
+    point. The active constraints are numbered.
+    If the constraints are of the form
+
+      A^T*x >= b
+
+    then the binding constraints are those where the >= is equality.
+    
+  */
+
 class Active_constraints {
     friend class Inactive_iter;
     
@@ -18,23 +30,23 @@ public:
     Real rhs(int k) const { return opt->consrhs[k]; }
     
     /// drop constraint
-    void drop (int k);
     /** drop constraint k from the active set. k is the index of the
     constraint in #active#
     
     */
+    void drop (int k);
     
     ///     add constraint j
-    void add(int j);
     /**
     add constraint j to the active set j is the index of the
     constraint in #inactive#   
     */
+    void add(int j);
 
     /// exchange in and out.
     void exchange(int in, int out) { add(in); drop (out); }
     
-    /// 
+
     Vector find_active_optimum(Vector g);
 
     /// get lagrange multipliers.
@@ -48,19 +60,10 @@ public:
     void OK();
 };
 
-/**
-    This class represents the set of active (binding) constraints
-    which can be active while the QLP algorithm is in a feasible
-    point. The active constraints are numbered.
-    If the constraints are of the form
-
-      A^T*x >= b
 
-    then the binding constraints are those where the >= is equality.
-    
+/**
+    loop through the inactive constraints.
   */
-
-///
 class Inactive_iter {
     int j;
     Active_constraints const* ac;
@@ -73,6 +76,3 @@ public:
     Real rhs() const { return ac->rhs(constraint_id()); }
     bool ok() const { return j < ac->inactive.size(); }
 };
-/**
-    loop through the inactive constraints.
-  */
index 44d42e5301ac57ffe40ea1c0533444d0c9f6ae12..d07bbd346995a6795d0b4c417cb87fcd9f97b1c3 100644 (file)
@@ -7,11 +7,16 @@
 #include "moment.hh"
 
 /// Hungarian postfix: req
+/**
+ a voice element wants something printed.
+see lilygut page
+ */
+
 struct Request {
     Voice_element*elt_l_;
     char const* defined_ch_c_l_m;
     
-    /****************/
+    /* *************** */
     Request();
     Request(Request const&);
     virtual ~Request(){}
@@ -47,11 +52,6 @@ struct Request {
 protected:
     virtual void do_print()const ;
 };
-/**
- a voice element wants something printed.
-see lilygut page
- */
-
 
 #define REQUESTMETHODS(T,accessor)     \
 virtual T * accessor() { return this;}\
@@ -83,7 +83,7 @@ struct Rhythmic_req : virtual Request {
     int balltype;
     int dots;
     Moment plet_factor;
-    /****************/
+    /* *************** */
     static int compare(const Rhythmic_req &, const Rhythmic_req &);
     Moment duration() const;
     Rhythmic_req();
@@ -95,7 +95,7 @@ struct Spacing_req :virtual Request {
     Moment next;
     Real distance;
     Real strength;
-    /****************/
+    /* *************** */
     Spacing_req();
     REQUESTMETHODS(Spacing_req, spacing);
 };
@@ -109,7 +109,7 @@ struct Blank_req : Spacing_req, Rhythmic_req {
 struct Text_req : virtual Request {
     int dir_i_;
     Text_def *tdef_p_;
-    /****************/
+    /* *************** */
     Text_req(int d, Text_def*);
     ~Text_req();
     Text_req(Text_req const&);
@@ -152,25 +152,29 @@ struct Note_req : Rhythmic_req, virtual Melodic_req {
 
 
 ///Put a rest on the staff.
+/**
+Why a request? It might be a good idea to not typeset the rest, if the paper is too crowded.
+*/
+
 struct Rest_req : Rhythmic_req {
 
  REQUESTMETHODS(Rest_req,rest);
 };
+/// attach a stem to the noteball
 /**
-Why a request? It might be a good idea to not typeset the rest, if the paper is too crowded.
-*/
+  Rhythmic_req parent needed to  determine if it will fit inside a beam.
+  */
 
-/// attach a stem to the noteball
 struct Stem_req : Rhythmic_req {
     int dir_i_;
     Stem_req(int s, int dots);
     REQUESTMETHODS(Stem_req,stem);
 };
-/**
-  Rhythmic_req parent needed to  determine if it will fit inside a beam.
-  */
 
 /// requests to start or stop something.
+/**
+ This type of request typically results in the creation of a #Spanner#
+*/
 struct Span_req : Request {
     /// should the spanner start or stop, or is it unwanted?
     enum {
@@ -182,25 +186,22 @@ struct Span_req : Request {
     Span_req();
   
 };
-/**
- This type of request typically results in the creation of a #Spanner#
-*/
 
 
 ///Start / stop a beam at this note.
+
+/**   if #nplet# is set, the staff will try to put an
+appropriate number over the beam
+    */
 struct Beam_req : Span_req {
     int nplet;
 
-    /****************/
+    /* *************** */
      REQUESTMETHODS(Beam_req,beam);
 
     Beam_req();
 };
 
-/**   if #nplet# is set, the staff will try to put an
-appropriate number over the beam
-    */
-
 /// a slur
 struct Slur_req : Span_req {
  REQUESTMETHODS(Slur_req,slur);
@@ -209,32 +210,32 @@ struct Slur_req : Span_req {
 
 
 ///Put a script above or below this ``note''    
+/** eg upbow, downbow. Why a request? These symbols may conflict with
+slurs and brackets, so this also a request */
 struct Script_req : Request {
     int dir_i_;
     Script_def *scriptdef_p_;
 
-    /****************/
+    /* *************** */
     static int compare(const Script_req &, const Script_req &);
     Script_req(int d, Script_def*);
     REQUESTMETHODS(Script_req,script);
     ~Script_req();
     Script_req(Script_req const&);
 };
-/** eg upbow, downbow. Why a request? These symbols may conflict with
-slurs and brackets, so this also a request */
 
 
 /// designate this spot with a name.
 struct Mark_req : Request {
     String mark_str_;
-    /****************/
+    /* *************** */
     Mark_req(String);
     REQUESTMETHODS(Mark_req,mark);
 };
 
 struct Staff_command_req : Request {
     Input_command * com_p_;
-    /****************/
+    /* *************** */
     Staff_command_req(Staff_command_req const&);
     ~Staff_command_req();
     Staff_command_req(Input_command*);
@@ -280,9 +281,6 @@ struct Subtle_req {
 };
 
 /// helper in the hierarchy
-struct Dynamic:Subtle_req {
-
-};
 /** Each dynamic is bound to one note ( a crescendo spanning multiple
     notes is thought to be made of two "dynamics": a start and a stop).
     Dynamic changes can occur in a smaller time than the length of its
@@ -295,6 +293,9 @@ struct Dynamic:Subtle_req {
     Dynamic should have been derived from request, but I don't want to
     fuss with virtual baseclasses.  */
 
+struct Dynamic:Subtle_req {
+
+};
 /// do a crescendo
 struct Cresc_req : Span_req, Dynamic {
     
index 02c6e0bff63f450899bfe898a70caf4291c104f3..d03bd0c96f800657721f890a6066000c51bc8f19 100644 (file)
@@ -8,13 +8,12 @@
 #define REST_HH
 #include "item.hh"
 
-/// ball at the end of the stem
 struct Rest : Item {
 
     int dots;
     int balltype;
 
-    /****************/
+    /* *************** */
 
 
     Rest(int dur,int dots);
@@ -22,12 +21,5 @@ struct Rest : Item {
     const char * name() const;
     Molecule* brew_molecule_p()const;
 };
-/**
-  takes care of:
-
-  * help lines  
-  * proper placing of dots 
-
-  */
 #endif 
 
index 75f1bcd89b43683fca64f5236ed51f20bea6a106..1d2f4022bbb9bd90de0ab062be548ded4a5042e3 100644 (file)
 #include "moment.hh"
 
 
+/**
+
+    When typesetting hasn't started on PScore yet, the columns which
+    contain data have a rhythmical position. Score_column is the type
+    with a rhythmical time attached to it. The calculation of
+    idealspacing is done with data in these columns. (notably: the
+    #durations# field)
+
+    */
+
 struct Score_column {
 
     /// indirection to column
@@ -19,10 +29,10 @@ struct Score_column {
     /// length of notes/rests in this column
     Array<Moment> durations;
     
-    /// 
+
     bool musical_;
     
-    /****************/
+    /* *************** */
     Moment when() {  return when_; }
     Score_column(Moment when);       
     static int compare(Score_column & c1, Score_column &c2);
@@ -35,15 +45,6 @@ struct Score_column {
 private:
     Moment when_;
 };
-/**
-
-    When typesetting hasn't started on PScore yet, the columns which
-    contain data have a rhythmical position. Score_column is the type
-    with a rhythmical time attached to it. The calculation of
-    idealspacing is done with data in these columns. (notably: the
-    #durations# field)
-
-    */
 
 instantiate_compare(Score_column&, Score_column::compare);
 
index 3c6ee0de0494e3ba33ed50c2551695adf9098182..f4e19870338fd72db780dd6f805ec9f79185858b 100644 (file)
@@ -19,7 +19,7 @@ Line_of_score {
     IPointerList<Line_of_staff*> staffs;
     PScore * pscore_l_;        // needed to generate staffs
 
-    /****************/
+    /* *************** */
     void process() ;
     Line_of_score(Array<PCol *> sv,  PScore *);
 
index 2a10e7d49ee4dbde69ad3b2c86fa9ad5530dd37d..9c48c75e248d5d33b631436df1965d1985f6b526 100644 (file)
@@ -19,7 +19,7 @@ struct Script : Item {
     Stem *stem_l_;
     Array<Item *> support;
 
-    /****************/
+    /* *************** */
     const char * name() const;    
     Molecule*  brew_molecule_p()const;
     virtual void do_post_processing();
index 423860a89505245232fd5e291139fe4582373e3a..3c22681d23d4eb3121d5a7274c8b0799c6fb4e45 100644 (file)
@@ -14,7 +14,7 @@ struct Script_def{
     bool invertsym;
     String symidx;
 
-    /****************/
+    /* *************** */
     int compare(Script_def const &);
     void print() const;
     Script_def(String, int, int ,bool);
index 1e1e2a86922e00c3faa30111fd1a3f06ee1a3940..38a420248b3bde368d7c9e7a6e5380288e2080d3 100644 (file)
@@ -9,11 +9,10 @@
 class Source_file
 {
 public:
-    ///
-    Source_file( String &filename_str );
     /**
       RETURN path to opened file.
      */
+    Source_file( String &filename_str );
     ~Source_file();
     char const* ch_c_l();
     String error_str( char const* pos_ch_c_l );
index 144b110e29df0b5e64bb4362d5d56f7b2c24d948..097a592cd608bf7edc898301375220060ebd3ceb 100644 (file)
 #include "staffelem.hh"
 
 /// a symbol which is attached between two columns.
+/** A spanner is a symbol which spans across several columns, so its
+  final appearance can only be calculated after the breaking problem
+  is solved.
+
+  Examples
+
+  - (de)crescendo
+  - slur
+  - beam
+  - bracket
+  
+
+  Spanner should know about the items which it should consider:
+    e.g. slurs should be steep enough to "enclose" all those items. This
+    is absolutely necessary for beams, since they have to adjust the
+    length of stems of notes they encompass.
+
+    */
 struct Spanner:Staff_elem {
     PCol *left, *right;
 
     
-    /****************/
+    /* *************** */
     
     Spanner();
     virtual Interval width()const;
@@ -25,29 +43,11 @@ struct Spanner:Staff_elem {
     virtual Spanner* spanner() { return this; }
 protected:
     /// clone a piece of  this spanner.
-    virtual Spanner *do_break_at( PCol *c1,  PCol *c2) const=0; 
     /**
  
     PRE
     c1 >= start, c2  <= stop
     */
+    virtual Spanner *do_break_at( PCol *c1,  PCol *c2) const=0; 
 };
-/** A spanner is a symbol which spans across several columns, so its
-  final appearance can only be calculated after the breaking problem
-  is solved.
-
-  Examples
-
-  - (de)crescendo
-  - slur
-  - beam
-  - bracket
-  
-
-  Spanner should know about the items which it should consider:
-    e.g. slurs should be steep enough to "enclose" all those items. This
-    is absolutely necessary for beams, since they have to adjust the
-    length of stems of notes they encompass.
-
-    */
 #endif
index 1a25b9bdb4cee95c4569fa03dbab95498cbe0693..1caead811eafd3e070a82a88cebce9285b716850 100644 (file)
@@ -14,7 +14,7 @@
 struct Staff_commands_at : public IPointerList<Command*> {
     Time_description tdescription_;
     
-    /****************/
+    /* *************** */
     
     bool is_breakable();
     Moment when();
index ba3df695bfe4a99655842c35846c3593e4c8c403..3928c994e919bc2806a11e52253f62d95ca8991c 100644 (file)
 #include "offset.hh"
 #include "molecule.hh"
 
+/** Both Spanner and Item are Staff_elem's. Most Staff_elem's depend
+  on other Staff_elem's, eg, Beam needs to know and set direction of
+  Stem. So the Beam has to be calculated *before* Stem. This is
+  accomplished with the dependencies field of struct Staff_elem.
+
+  */
 struct Staff_elem {
     enum Status {
        ORPHAN,                 // not yet added to pstaff
@@ -25,7 +31,7 @@ struct Staff_elem {
     ///  the pstaff it is in
     PStaff *pstaff_l_;
 
-    /****************/
+    /* *************** */
     Staff_elem(Staff_elem const&);
     String TeXstring () const ;
     virtual void print() const;
@@ -65,21 +71,14 @@ private:
     /// member: the symbols
     Molecule *output;          // should scrap, and use temp var?
 
-    /// 
-    Offset offset_;
+
     /**
       This is  needed, because #output# may still be
       NULL.
       */
+    Offset offset_;
     Array<Staff_elem*> dependencies;
 };
-/** Both Spanner and Item are Staff_elem's. Most Staff_elem's depend
-  on other Staff_elem's, eg, Beam needs to know and set direction of
-  Stem. So the Beam has to be calculated *before* Stem. This is
-  accomplished with the dependencies field of struct Staff_elem.
-
-  */
-
 #define NAME_METHOD(c) const char *c::name()const{ return #c; } struct c
 #endif // STAFFELEM_HH
 
index f44754a5d216af1970cb5199406ebb4bfefdaa0c..9fbe3ec9177a1964c56c3c7b4815c452a4784ed9 100644 (file)
@@ -20,7 +20,7 @@ struct Line_of_staff {
     Line_of_score  * line_of_score_l_;
     PStaff *pstaff_l_;
 
-    /****************/
+    /* *************** */
     
     String TeXstring() const;
     Line_of_staff(Line_of_score*, PStaff *);
index efac63e7b030681d507398383fe4942fceed7a63..3b78c29c6b75493dfdc4c6ca0238ef6a40cbee39 100644 (file)
 
 #include "staff.hh"
 
+/**
+  manage run-time info when walking staffcolumns such as: key,
+  meter, pending beams & slurs
+  */
 struct Staff_walker : public PCursor<Staff_column*> {
     Staff * staff_l_;
     PScore * pscore_l_;
 
     int break_status;
     
-    /****************/
+    /* *************** */
 
     int priority() const;              // Command
     Moment when() const;    
@@ -26,9 +30,9 @@ struct Staff_walker : public PCursor<Staff_column*> {
     void process_command(Command *);
     void operator++(int);
 
-    /****************
+    /* ***************
       VIRTUAL
-     ****************/
+     *************** */
 
     /// every time ++ is called
     virtual void do_pre_move(){}
@@ -39,10 +43,6 @@ struct Staff_walker : public PCursor<Staff_column*> {
 private:
     Staff_walker(Staff_walker const&);
 };
-/**
-  manage run-time info when walking staffcolumns such as: key,
-  meter, pending beams & slurs
-  */
 
 #endif // STAFFWALKER_HH
 
index e4c3794a8c0e60562852a9b8df9dc855770ae9e7..962d1f4ba3ffba7d302383fff19846115a1bde23 100644 (file)
 #include "moment.hh"
 
 /// the rule attached to the ball
+/**
+  takes care of:
+
+  \begin{itemize}
+  \item the rule
+  \item the flag
+  \item up/down position.
+  \end{itemize}
+  */
+
 struct Stem : Item {
 /*
     /// rhythmical length
@@ -29,27 +39,27 @@ struct Stem : Item {
     int staff_center;
 
     // extent of the stem (positions)
-    Real bot, top;
     /**
       fractional, since Beam has to adapt them.
       */
 
+    Real bot, top;
     Real stemlen;
     
     /// flagtype? 4 none, 8 8th flag, 0 = beam.
     int flag;
 
     ///geen gedonder, jij gaat onder
-    int dir;
     /**
        -1 stem points down, +1: stem points up
        */
 
+    int dir;
     Real stem_xoffset;
     
     Array<Notehead*> heads;
 
-    /****************/
+    /* *************** */
     Stem(int center); //, Moment duration);
     
     /// ensure that this Stem also encompasses the Notehead #n#
@@ -70,14 +80,4 @@ struct Stem : Item {
 
     Molecule* brew_molecule_p() const;
 };
-/**
-  takes care of:
-
-  \begin{itemize}
-  \item the rule
-  \item the flag
-  \item up/down position.
-  \end{itemize}
-  */
-
 #endif
index 4e95c93a6e66f2189dcca80419a19073e19867f1..8100ed45d88992c1dfa89a349e297f02b4c1ab67 100644 (file)
@@ -17,7 +17,7 @@ struct Text_def  {
     char const* defined_ch_c_l_m;
   
 
-    /*****************/
+    /* ****************/
     virtual ~Text_def() {};
     bool compare(const Text_def&);
     Text_def();
index c563fc80ca7f6a2ff070348098b518b79bac41eb..c7df9069d96c11420b39e81616801b90335d717b 100644 (file)
@@ -16,7 +16,7 @@ struct Text_item : Item {
     int dir_i_;
     Text_def* tdef_l_;
     
-    /****************/
+    /* ***************/
     const char * name() const;    
     virtual void set_default_pos();
     Molecule* brew_molecule_p() const;
index 5fb77497938b5e4de71b779b42c3646b15b6d83b..4eb5db119464916f1e8b8b362de77f1ab399280c 100644 (file)
@@ -29,7 +29,7 @@ struct Time_description {
     /// idem
     int bars;
 
-    /****************/
+    /* *************** */
     void set_cadenza(bool);
     void OK() const;
     Time_description(Moment, const Time_description*);
index 03ea55b9ee21201bf6e8b82e75e574e26033da45..20538ae861743767f2ac9fdf7301772f095f9d8a 100644 (file)
@@ -6,11 +6,18 @@
 #include "moment.hh"
 
 /// class for  horizontal stuff.
+/**
+
+    Voice is a ordered row of Voice_elements. It is strictly horizontal:
+    you cannot have two rhythmic elements running parallel in a Voice
+
+    */
+
 struct Voice {
     IPointerList<Voice_element *> elts;
     Moment start;
 
-    /****************/
+    /* *************** */
     Moment when(const Voice_element*)const;
     Moment last() const;
     Voice();
@@ -19,21 +26,16 @@ struct Voice {
     void print() const;
     void set_default_group(String id);
 };
-/**
-
-    Voice is a ordered row of Voice_elements. It is strictly horizontal:
-    you cannot have two rhythmic elements running parallel in a Voice
-
-    */
-
 /// one horizontal bit. 
+/** Apart from being a container for the requests, Voice_element is nothing
+    */
 struct Voice_element {
     Moment duration;
     char const* defined_ch_c_l_m;
     const Voice *voice_l_;
     IPointerList<Request*> reqs;
 
-    /****************/
+    /* *************** */
     
     void add(Request*);
     Voice_element();
@@ -41,6 +43,4 @@ struct Voice_element {
     void print ()const;
     void set_default_group(String id);
 };
-/** Apart from being a container for the requests, Voice_element is nothing
-    */
 #endif
index 1e09658fee90d91b4632870ea0f31aef385a8383..c52fdc7b329b324a974f625bc2fce765b85095bc 100644 (file)
@@ -39,7 +39,7 @@ Atom::TeXstring() const
     return substitute_args(s, a);
 }
 
-/****************/
+/* *************** */
 
 String
 Molecule::TeXstring() const
index f22f44d7b9ab957b12f15b7c3b6b481bfd4d070a..e6d62644b2f12b6adb22342b77d21d8a895ac81f 100644 (file)
@@ -28,7 +28,7 @@ Notename_tab::set(int l, int s, String n)
     assert(l < 8 && s <= 2 && s >= -2 && l >=0);
     notetab[l * 5 + s +2] = n;
 }
-/****************/
+/* *************** */
 void
 My_flex_lexer::set(Notename_tab *n)
 {
index 280f0db4ccde40d992b57b9880e770dfe101cdd9..1e3e2f67d495cf59dade64ff5ee47ae4beda1571 100644 (file)
@@ -116,7 +116,7 @@ Ineq_constrained_qp::print() const
 #endif
 }
 
-/****************/
+/* *************** */
 
 /*
     eliminate appropriate variables, until we have a Ineq_constrained_qp
index dd9c4043a2983b89c5b89a587623e6d7ad123308..ed49c2a02f8a5d2c6e3e0962a8a1f69dd78756ce 100644 (file)
@@ -142,7 +142,7 @@ Active_constraints::find_active_optimum(Vector g)
     return H*g;
 }
 
-/****************************************************************/
+/* *************************************************************** */
 
 int
 min_elt_index(Vector v)
@@ -159,6 +159,19 @@ min_elt_index(Vector v)
 }
 
 ///the numerical solving
+/** Mordecai Avriel, Nonlinear Programming: analysis and methods (1976)
+    Prentice Hall.
+
+    Section 13.3
+
+    This is a "projected gradient" algorithm. Starting from a point x
+    the next point is found in a direction determined by projecting
+    the gradient onto the active constraints.  (well, not really the
+    gradient. The optimal solution obeying the active constraints is
+    tried. This is why H = Q^-1 in initialisation) )
+
+
+    */
 Vector
 Ineq_constrained_qp::solve(Vector start) const 
 {    
@@ -248,17 +261,4 @@ Ineq_constrained_qp::solve(Vector start) const
     return x;
 } 
 
-/** Mordecai Avriel, Nonlinear Programming: analysis and methods (1976)
-    Prentice Hall.
-
-    Section 13.3
-
-    This is a "projected gradient" algorithm. Starting from a point x
-    the next point is found in a direction determined by projecting
-    the gradient onto the active constraints.  (well, not really the
-    gradient. The optimal solution obeying the active constraints is
-    tried. This is why H = Q^-1 in initialisation) )
-
-
-    */
     
index 05e2e9c93e5839c24aed96aa2d221ff26abad767..d56c58a3c404e23cc07d2f228286a95a50d3b08d 100644 (file)
@@ -72,4 +72,4 @@ Tex_stream::operator<<(String s)
 }
 
 
-/****************************************************************/
+/* *************************************************************** */
index 2e7b0b5111351ebbecb1096595b0d0a0cbb09f53..8bccb12d8d1b8003408d9e303fef6c6a2a863200 100644 (file)
@@ -49,7 +49,7 @@ Voice::last() const
        l  += i->duration;
     return l;
 }
-/****************************************************************/
+/* *************************************************************** */
 void
 Voice_element::print() const
 {