From 427f56310c1b51d97de5293dfeded0ea0dc0dd8f Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:55:23 +0000 Subject: [PATCH] lilypond-0.1.9 --- lily/include/spring-spacer.hh | 82 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/lily/include/spring-spacer.hh b/lily/include/spring-spacer.hh index 27985d8e9e..e8dc25db3b 100644 --- a/lily/include/spring-spacer.hh +++ b/lily/include/spring-spacer.hh @@ -14,6 +14,7 @@ #include "plist.hh" #include "col-info.hh" #include "colhpos.hh" +#include "moment.hh" /** Determine positions of columns connected by springs and held apart by rods. @@ -41,64 +42,65 @@ */ class Spring_spacer : public Line_spacer { - friend class Durations_iter; + friend class Durations_iter; - Pointer_list ideal_p_list_; - Array cols; - Array loose_col_arr_; + Pointer_list ideal_p_list_; + Array cols; + Array loose_col_arr_; - /// mark column #i# as being loose. - void loosen_column (int i); - /// the index of #c# in #cols# - int col_id (PCol const *c) const; + /// mark column #i# as being loose. + void loosen_column (int i); + /// the index of #c# in #cols# + int col_id (PCol const *c) const; - /// generate an (nonoptimal) solution - Vector find_initial_solution() const; + /// generate an (nonoptimal) solution + Vector find_initial_solution() const; - /// check if problem is too tight - bool check_feasible() const; + /// check if problem is too tight + bool check_feasible() const; - /// does #this# contain the column #w#? - bool contains (PCol const *w); + /// does #this# contain the column #w#? + bool contains (PCol const *w); - /// make the energy function - void make_matrices (Matrix &quad, Vector &lin,Real&) const; + /// make the energy function + void make_matrices (Matrix &quad, Vector &lin,Real&) const; + void get_ruling_durations(Array&, Array&); - /// generate the LP constraints - void make_constraints (Mixed_qp& lp) const; + /// generate the LP constraints + void make_constraints (Mixed_qp& lp) const; - void handle_loose_cols(); - void position_loose_cols (Vector &) const; - /** - add a idealspacing to the problem. + void handle_loose_cols(); + void position_loose_cols (Vector &) const; + /** + add a idealspacing to the problem. One pair of columns can have no, one or more idealspacings, since they can be "summed" if the columns to which #i# refers are not in this problem, the spacing is ignored. */ - void add_ideal (Idealspacing const *i); - Vector try_initial_solution() const; - void calc_idealspacing(); - void set_fixed_cols (Mixed_qp&)const; - - Score_column* scol_l (int); - void connect (int i,int j, Real,Real); - Line_of_cols error_pcol_l_arr()const; + void add_ideal (Idealspacing const *i); + Vector try_initial_solution() const; + void calc_idealspacing(); + void set_fixed_cols (Mixed_qp&)const; + + Score_column* scol_l (int); + void connect (int i,int j, Real,Real); + Line_of_cols error_pcol_l_arr()const; public: - static Line_spacer *constructor(); + static Line_spacer *constructor(); - virtual void solve (Col_hpositions*) const; - virtual void lower_bound_solution (Col_hpositions*) const; - virtual void add_column (PCol *, bool fixed=false, Real fixpos=0.0); + virtual void solve (Col_hpositions*) const; + virtual void lower_bound_solution (Col_hpositions*) const; + virtual void add_column (PCol *, bool fixed=false, Real fixpos=0.0); - virtual Vector default_solution() const; - virtual bool check_constraints (Vector v) const; - virtual void OK() const; - virtual void print() const; - virtual void prepare(); - virtual ~Spring_spacer(){} + virtual Vector default_solution() const; + virtual bool check_constraints (Vector v) const; + virtual void OK() const; + virtual void print() const; + virtual void prepare(); + virtual ~Spring_spacer(){} }; #endif // SPRING_SPACER_HH -- 2.39.5