2 colhpos.cc -- implement Column_x_positions
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
13 #include "line-spacer.hh"
15 Column_x_positions::Column_x_positions()
17 energy_f_
= infinity_f
;
18 satisfies_constraints_b_
= false;
22 Column_x_positions::~Column_x_positions()
28 Column_x_positions::add_paper_column (Paper_column
*c
)
34 Column_x_positions::print() const
37 DOUT
<< "energy : " << energy_f_
<< '\n';
38 DOUT
<< "line of " << config_
.size() << " cols\n";
45 Column_x_positions::OK() const
48 assert (config_
.size() == cols_
.size ());
53 Column_x_positions::set_stupid_solution(Vector v
)
55 energy_f_
= infinity_f
;
60 Column_x_positions::stupid_solution()
62 set_stupid_solution (spacer_l_
->default_solution());
66 Column_x_positions::solve_line()
68 spacer_l_
->solve (this);
73 Column_x_positions::approximate_solve_line()
75 spacer_l_
->lower_bound_solution (this);