X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcolumn-x-positions.cc;h=d5d60e110b7fd4327d7e922cfd4326e153dce73f;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=988cf4f054e2410d2b5685821dfc57026726b70c;hpb=998986bbd15afaafb24904a777e8be9ba1233799;p=lilypond.git diff --git a/lily/column-x-positions.cc b/lily/column-x-positions.cc index 988cf4f054..d5d60e110b 100644 --- a/lily/column-x-positions.cc +++ b/lily/column-x-positions.cc @@ -1,78 +1,26 @@ /* - colhpos.cc -- implement Column_x_positions + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 1997--2015 Han-Wen Nienhuys - (c) 1997--1999 Han-Wen Nienhuys -*/ - -#include "column-x-positions.hh" -#include "real.hh" -#include "debug.hh" -#include "vector.hh" -#include "line-spacer.hh" - -Column_x_positions::Column_x_positions() -{ - energy_f_ = infinity_f; - satisfies_constraints_b_ = false; - spacer_l_ =0; -} - -Column_x_positions::~Column_x_positions() -{ - -} - -void -Column_x_positions::add_paper_column (Paper_column*c) -{ - cols_.push (c); -} - -void -Column_x_positions::print() const -{ -#ifndef NPRINT - DOUT << "energy : " << energy_f_ << '\n'; - DOUT << "line of " << config_.size() << " cols\n"; - Vector v (config_); - DOUT << v; -#endif -} - -void -Column_x_positions::OK() const -{ -#ifndef NDEBUG - assert (config_.size() == cols_.size ()); -#endif -} + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. -void -Column_x_positions::set_stupid_solution(Vector v) -{ - energy_f_ = infinity_f; - config_ = v; -} + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. -void -Column_x_positions::stupid_solution() -{ - // set_stupid_solution (spacer_l_->default_solution()); -} - -void -Column_x_positions::solve_line() -{ - spacer_l_->solve (this); -} + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . +*/ +#include "column-x-positions.hh" -void -Column_x_positions::approximate_solve_line() +Column_x_positions::Column_x_positions () { - spacer_l_->lower_bound_solution (this); + satisfies_constraints_ = true; + force_ = 0; } - -