]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.9
authorfred <fred>
Sun, 24 Mar 2002 19:55:23 +0000 (19:55 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:55:23 +0000 (19:55 +0000)
lily/include/spring-spacer.hh

index 27985d8e9ec09ebbe21d527efe76aa2105400013..e8dc25db3be5c260e83b0782093eb0f85652ca3b 100644 (file)
@@ -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.
 */
 
 class Spring_spacer : public Line_spacer {
-    friend class Durations_iter;
+  friend class Durations_iter;
     
-    Pointer_list<Idealspacing *> ideal_p_list_;
-    Array<Colinfo> cols;
-    Array<Colinfo> loose_col_arr_;
+  Pointer_list<Idealspacing *> ideal_p_list_;
+  Array<Colinfo> cols;
+  Array<Colinfo> 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<Moment>&, Array<Moment>&);
 
-    /// 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