X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fpage-turn-page-breaking.hh;h=93fdaceadaf8cdd9f66939f0b40fc5690dcf1f95;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=e386cc85daa4e75bea0fd294f24d7a2104cebb71;hpb=ba420bc05855eeca5fb937939261baffd614c2ef;p=lilypond.git diff --git a/lily/include/page-turn-page-breaking.hh b/lily/include/page-turn-page-breaking.hh index e386cc85da..93fdaceada 100644 --- a/lily/include/page-turn-page-breaking.hh +++ b/lily/include/page-turn-page-breaking.hh @@ -1,19 +1,26 @@ /* - page-turn-page-breaking.hh -- break lines and pages optimally - for a whole Paper_book such that page turns can only occur - at specific places. + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2006--2015 Joe Neeman - (c) 2006 Joe Neeman + 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. + + 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. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #ifndef PAGE_TURN_PAGE_BREAKING_HH #define PAGE_TURN_PAGE_BREAKING_HH -#include "constrained-breaking.hh" #include "page-breaking.hh" -#include "lily-guile.hh" /* A dynamic programming solution to breaking pages @@ -33,44 +40,37 @@ protected: int first_page_number_; vsize page_count_; - Real force_; - Real penalty_; - - Real line_force_; - Real line_penalty_; - /* true if every score here is too widely spaced */ bool too_many_lines_; Real demerits_; vsize break_pos_; /* index into breaks_ */ - vector div_; /* our division of systems between scores on this page */ + Line_division div_; vector system_count_; /* systems per page */ Break_node () { prev_ = break_pos_ = VPOS; - penalty_ = force_ = 0; - line_penalty_ = line_force_ = 0; demerits_ = infinity_f; first_page_number_ = 0; + page_count_ = 0; too_many_lines_ = false; } }; - std::vector state_; + vector state_; + vsize total_page_count (Break_node const &b); Break_node put_systems_on_pages (vsize start, - vsize end, - vector const &lines, - vector const &system_div, - int page_number); + vsize end, + vsize configuration, + vsize page_number); SCM make_lines (vector *breaks); SCM make_pages (vector const &breaks, SCM systems); - Real calc_demerits (Break_node const &me); void calc_subproblem (vsize i); + void print_break_node (Break_node const &b); }; #endif /* PAGE_TURN_PAGE_BREAKING_HH */