]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/page-turn-page-breaking.hh
Run `make grand-replace'.
[lilypond.git] / lily / include / page-turn-page-breaking.hh
index e386cc85daa4e75bea0fd294f24d7a2104cebb71..7c7ef8f47b93fd2e4ef5fc8aad9145416e013bcc 100644 (file)
@@ -5,15 +5,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2006 Joe Neeman <joeneeman@gmail.com>
+  (c) 2006--2008 Joe Neeman <joeneeman@gmail.com>
 */
 
 #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 +31,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<vsize> div_;  /* our division of systems between scores on this page */
+    Line_division div_;
     vector<vsize> 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<Break_node> state_;
+  vector<Break_node> state_;
 
+  vsize total_page_count (Break_node const &b);
   Break_node put_systems_on_pages (vsize start,
                                   vsize end,
-                                  vector<Line_details> const &lines,
-                                  vector<vsize> const &system_div,
-                                  int page_number);
+                                  vsize configuration,
+                                  vsize page_number);
 
   SCM make_lines (vector<Break_node> *breaks);
   SCM make_pages (vector<Break_node> 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 */