2 idealspacing.cc -- implement Idealspacing
4 source file of the GNU LilyPond music typesetter
6 (c) 1996, 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "idealspacing.hh"
10 #include "paper-column.hh"
11 #include "paper-score.hh"
15 Idealspacing::print() const
18 DEBUG_OUT
<< "idealspacing {" ;
19 DEBUG_OUT
<< "distance " << space_f_
<< " strength " << hooke_f_
;
20 DEBUG_OUT
<< "left " << cols_drul_
[LEFT
] << " right " << cols_drul_
[RIGHT
] << "}\n";
24 Idealspacing::Idealspacing()
28 cols_drul_
[LEFT
] = cols_drul_
[RIGHT
] = -1;
32 Idealspacing::OK() const
34 assert (hooke_f_
>= 0);
38 Idealspacing::energy_f(Real x
) const
40 Real dx
= (space_f_
- x
);