2 colhpos.cc -- implement Col_hpositions
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
13 #include "line-spacer.hh"
15 Col_hpositions::Col_hpositions()
17 energy_f_
= infinity_f
;
19 satisfies_constraints_b_
= false;
23 Col_hpositions::~Col_hpositions()
29 Col_hpositions::add (Paper_column
*c
)
35 Col_hpositions::print() const
38 DOUT
<< "energy : " << energy_f_
<< '\n';
39 DOUT
<< "line of " << config
.size() << " cols\n";
46 Col_hpositions::OK() const
49 assert (config
.size() == cols
.size ());
54 Col_hpositions::set_stupid_solution(Vector v
)
56 energy_f_
= infinity_f
;
62 Col_hpositions::stupid_solution()
64 set_stupid_solution (spacer_l_
->default_solution());
68 Col_hpositions::solve_line()
70 spacer_l_
->solve (this);
75 Col_hpositions::approximate_solve_line()
77 spacer_l_
->lower_bound_solution (this);