]> git.donarmstrong.com Git - lilypond.git/blob - lily/column-x-positions.cc
4ac09b029c4a7b43406e2d3f3599b753c4a087b3
[lilypond.git] / lily / column-x-positions.cc
1 /*
2   colhpos.cc -- implement Column_x_positions
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "column-x-positions.hh"
10 #include "real.hh"
11 #include "debug.hh"
12 #include "line-spacer.hh"
13
14 Column_x_positions::Column_x_positions()
15 {
16   energy_f_ = infinity_f;
17   satisfies_constraints_b_ = false;
18   spacer_l_ =0;
19 }
20
21 Column_x_positions::~Column_x_positions()
22 {
23
24 }
25
26 void
27 Column_x_positions::add_paper_column (Paper_column*c)
28 {
29   cols_.push (c);
30 }
31
32 void
33 Column_x_positions::print() const
34 {
35 #ifndef NPRINT
36   DEBUG_OUT << "energy : " << energy_f_ << '\n';
37   DEBUG_OUT << "line of " << config_.size() << " cols\n";
38 #endif
39 }
40
41 void
42 Column_x_positions::OK() const
43 {
44 #ifndef NDEBUG
45   assert (config_.size() == cols_.size ());
46 #endif
47 }
48
49
50 void
51 Column_x_positions::stupid_solution()
52 {
53   //  set_stupid_solution (spacer_l_->default_solution());
54 }
55
56 void
57 Column_x_positions::solve_line() 
58 {
59   spacer_l_->solve (this);
60 }
61
62
63 void
64 Column_x_positions::approximate_solve_line() 
65 {
66   spacer_l_->lower_bound_solution (this);
67 }
68
69