From: fred Date: Sun, 24 Mar 2002 20:05:50 +0000 (+0000) Subject: lilypond-0.1.45 X-Git-Tag: release/1.5.59~3432 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b95191ed2fcb2510bdc3b3903268587bea794d93;p=lilypond.git lilypond-0.1.45 --- diff --git a/lily/Stable.make b/lily/Stable.make index 6aebc2b0a5..40eaaf2211 100644 --- a/lily/Stable.make +++ b/lily/Stable.make @@ -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 diff --git a/lily/include/col-info.hh b/lily/include/col-info.hh index 46f6cf20c3..50944b6fc4 100644 --- a/lily/include/col-info.hh +++ b/lily/include/col-info.hh @@ -1,5 +1,5 @@ /* - col-info.hh -- declare + col-info.hh -- declare Colinfo source file of the GNU LilyPond music typesetter @@ -16,19 +16,19 @@ /// helper struct for #Spacing_problem# struct Colinfo { - Paper_column *pcol_l_; - P 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 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 diff --git a/lily/spring-spacer.cc b/lily/spring-spacer.cc index 3439557f2c..94fd515d39 100644 --- a/lily/spring-spacer.cc +++ b/lily/spring-spacer.cc @@ -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 ideal_arr_; Array hooke_arr_; @@ -630,6 +634,7 @@ Spring_spacer::calc_idealspacing() + interline_f / 2; dist = dist >? minimum; } + ideal_arr_[i] = dist; } }