-vsize
-min_page_count (vector<Line_details> const &lines,
- Real page_height, bool ragged, bool ragged_last);
-
-Spacing_result
-space_systems_on_n_pages (vector<Line_details> const&,
- vsize n,
- Real page_height,
- bool ragged,
- bool ragged_last);
-
-Spacing_result
-space_systems_on_n_or_one_more_pages (vector<Line_details> const&,
- vsize n,
- Real page_height,
- Real odd_pages_penalty,
- bool ragged,
- bool ragged_last);
-Spacing_result
-space_systems_on_best_pages (vector<Line_details> const&,
- Real page_height,
- Real odd_pages_penalty,
- bool ragged,
- bool ragged_last);
+struct Page_spacing
+{
+ Real force_;
+ Real page_height_;
+ Real rod_height_;
+ Real spring_len_;
+ Real inverse_spring_k_;
+ Real page_top_space_;
+
+ Line_details last_line_;
+ Line_details first_line_;
+
+ Page_spacing (Real page_height, Real page_top_space)
+ {
+ page_height_ = page_height;
+ page_top_space_ = page_top_space;
+ clear ();
+ }
+
+ void calc_force ();
+ void resize (Real new_height);
+ void append_system (const Line_details &line);
+ void prepend_system (const Line_details &line);
+ void clear ();
+};