]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.45
authorfred <fred>
Sun, 24 Mar 2002 20:05:50 +0000 (20:05 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:05:50 +0000 (20:05 +0000)
lily/Stable.make
lily/include/col-info.hh
lily/spring-spacer.cc

index 6aebc2b0a511304e50ce841b85d8ef87c1e2233e..40eaaf221177e19a4f6993ab2b77edd952d67e10 100644 (file)
@@ -5,6 +5,5 @@ stablecc=meter.cc boxes.cc \
        keyword.cc leastsquares.cc \
        lookup.cc meter.cc\
        parser.cc notename-table.cc lexer.cc\
-       qlp.cc qlpsolve.cc\
        template*.cc  version.cc tex-stream.cc  tex.cc\
        identifier.cc note.cc
index 46f6cf20c3d4f87734246c30796bf9c8bae40fb1..50944b6fc43d2f0f2cf66989c26dcc3218161c62 100644 (file)
@@ -1,5 +1,5 @@
 /*
-  col-info.hh -- declare 
+  col-info.hh -- declare Colinfo
 
   source file of the GNU LilyPond music typesetter
 
 
 /// helper struct for #Spacing_problem#
 struct Colinfo {
-    Paper_column *pcol_l_;
-    P<Real> fixpos_p_;
-    Interval width_;
-    int rank_i_;
-    /// did some tricks to make this column come out.
-    bool ugh_b_;               
-    /* *************** */
-    Colinfo();
-    Colinfo (Paper_column *,Real const *);
-
-    void print() const;
-    bool fixed() const { return fixpos_p_.get_C();}
-    Real fixed_position() const { return *fixpos_p_; }
+  Paper_column *pcol_l_;
+  P<Real> fixpos_p_;
+  Interval width_;
+  int rank_i_;
+  /// did some tricks to make this column come out.
+  bool ugh_b_;         
+  /* *************** */
+  Colinfo();
+  Colinfo (Paper_column *,Real const *);
+
+  void print() const;
+  bool fixed() const { return fixpos_p_.get_C();}
+  Real fixed_position() const { return *fixpos_p_; }
 };
 
 #endif // COL_INFO_HH
index 3439557f2c3de715a613f840993dbefda4447892..94fd515d3911dba6a14e74ec7d17d5d17430ec5b 100644 (file)
@@ -242,13 +242,14 @@ Spring_spacer::set_fixed_cols (Mixed_qp &qp) const
   for (int j=0; j < cols.size(); j++)
     if (cols[j].fixed())
       qp.add_fixed_var (j,cols[j].fixed_position());
-}
+} 
 
 // put the constraints into the LP problem
 void
 Spring_spacer::make_constraints (Mixed_qp& lp) const
 {
   int dim=cols.size();
+  Real nw_f = paper_l ()->note_width ();
   for (int j=0; j < dim; j++)
     {
       Colinfo c=cols[j];
@@ -258,8 +259,9 @@ Spring_spacer::make_constraints (Mixed_qp& lp) const
 
          c1(j)=1.0 ;
          c1(j-1)=-1.0 ;
-         lp.add_inequality_cons (c1,
-                                 cols[j-1].width_[RIGHT] - cols[j].width_[LEFT]);
+
+         lp.add_inequality_cons (c1, cols[j-1].width_[RIGHT] 
+                                 - cols[j].width_[LEFT]);
        }
     }
 }
@@ -399,7 +401,8 @@ Spring_spacer::connect (int i, int j, Real d, Real h)
   assert(h >=0);
 
   Idealspacing * s = new Idealspacing;
-  s->left_i_ = i;
+
+  s->left_i_ = i ;
   s->right_i_ = j;
   s->space_f_ = d;
   s->hooke_f_ = h;
@@ -509,6 +512,7 @@ Spring_spacer::calc_idealspacing()
   get_ruling_durations(shortest_playing_arr, context_shortest_arr);
 
   Real interline_f = paper_l ()->interline_f ();
+  Real nw_f = paper_l ()->note_width ();
 
   Array<Real> ideal_arr_;
   Array<Real> hooke_arr_;
@@ -630,6 +634,7 @@ Spring_spacer::calc_idealspacing()
                + interline_f / 2;
              dist = dist >? minimum;
            }
+
          ideal_arr_[i] = dist;
        }
     }