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
/*
- 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
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];
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]);
}
}
}
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;
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_;
+ interline_f / 2;
dist = dist >? minimum;
}
+
ideal_arr_[i] = dist;
}
}