[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: setting the number of pages for a score
From: |
Han-Wen Nienhuys |
Subject: |
Re: setting the number of pages for a score |
Date: |
Sun, 19 Feb 2006 14:21:49 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.1.fc4 (X11/20050929) |
Joe Neeman wrote:
I've cleaned up most (all?) of the issues that you brought up with my
There's still some variable naming issues. I prefer not to postpone
those until the code is merged, because I tend to fix those asap, and
that makes it harder to sync your and my trees.
previous code. I've moved some things around to improve readability and
I've addressed a few of the performance problems. Also, it is now
cool
#include "ly-smobs.icc"
this is not necessary, is it?
Optimal_breaking::best_page (vector<System_spec> const &sys,
Optimal_break_node &me)
We never use non-const references, as they make it hard to see that an
argument is modified. Typically, this function should be a member of
Optimal_break_node, but if you want to keep this design, it has to be a
pointer.
/* unlike the default page breaker, we store our penalties in the system that
* ends the page */
is there a reason for this, shouldn't we rather unify this
/* TODO: support raggedness */
I would like to integrate this code soonish, but the new line breaker
should support the same functionality as the old one, so we have to have
raggedness too.
if (!systems_) systems_ = 4; /* just to make this compatible with Gourlay */
I don't understand. What's the meaning of 4 ?
vector<Column_x_positions>
Constrained_breaking::get_soln (int start, int end, int nsys)
soln ? You mean solution ?
nsys would be called system_count within lilypond code base.
void
Constrained_breaking::prepare_solution (int start, int end, int nsys, int &rank,
int &brk)
once again: no &
class Prob;
class Paper_score;
these should not be necessary: just include lily-proto.hh.
class Optimal_breaking
{
public:
// return a list of pages
SCM solve ();
Optimal_breaking (Paper_book *pb);
private:
// the ith entry is for distributing the first i page-breakable-chunks
std::vector<Optimal_break_node> state_;
std::vector<Break_position> breaks_;
// list of Paper_score and Prob objects
std::vector<System_spec> all_;
// One line breaker for each paper score
std::vector<Constrained_breaking> line_breaking_;
Paper_book *book_;
int next_system (int starting_brk_index) const;
Real page_height (int pnum, bool last);
void fill_page (vector<System_spec> const &sys, Page_spacing &page);
/* move the given system from the left page to the right page,
* updating all the forces. prev will now be the last system on the
* left page */
we do function documentation in the CC files exclusively. Can you move
these comments? If it needs comments, you might want to reconsider the
naming anyway.
--
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen
- Re: setting the number of pages for a score, (continued)
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/14
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/14
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/14
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/14
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/14
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/15
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/19
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/19
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/19
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/19
- Re: setting the number of pages for a score,
Han-Wen Nienhuys <=
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/19
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/19
- Re: setting the number of pages for a score, Werner LEMBERG, 2006/02/20
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/20
- Re: setting the number of pages for a score, Werner LEMBERG, 2006/02/21
- Re: setting the number of pages for a score, Joe Neeman, 2006/02/21
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/21
- Re: setting the number of pages for a score, Werner LEMBERG, 2006/02/21
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/21
- Re: setting the number of pages for a score, Han-Wen Nienhuys, 2006/02/21