]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.28
authorfred <fred>
Sun, 24 Mar 2002 19:29:23 +0000 (19:29 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:29:23 +0000 (19:29 +0000)
hdr/break.hh

index 2f471fd4fd1d2d5b656d4170212aca3916d5dca3..9ecb484e5b156d253db8aee2f87f3bfa03118015 100644 (file)
@@ -8,20 +8,7 @@
 #define BREAK_HH
 #include "varray.hh"
 #include "proto.hh"
-typedef Array<PCol*>  Line_of_cols;
-
-struct Col_configuration {
-    Line_of_cols cols;
-    Array<Real> config;
-    Real energy;
-
-    /****************/
-    void OK()const;
-    void setsol(Array<Real>);
-    Col_configuration() ;
-    void add( PCol*c);
-    void print() const;
-};
+#include "colhpos.hh"
 
 struct Break_algorithm {
     PScore &pscore_;
@@ -30,24 +17,25 @@ struct Break_algorithm {
     /****************/
 
     Break_algorithm(PScore&);
+
     /// check if the spacing/breaking problem is well-stated
     void problem_OK()const;
+
     /// search all pcols which are breakable.
-    Array<PCol *> find_breaks() const;
+    Line_of_cols find_breaks() const;
 
      /// helper: solve for the columns in #curline#.
-    Array<Real> solve_line(Line_of_cols) const;
+    Col_hpositions solve_line(Line_of_cols) const;
 
-    
     /// does curline fit on the paper?    
     bool feasible(Line_of_cols)const;
     
-    virtual Array<Col_configuration> solve()=0;
+    virtual Array<Col_hpositions> solve()=0;
 };
 
 /// wordwrap type algorithm: move to next line if current is optimal.
 struct Word_wrap : Break_algorithm {
-    virtual Array<Col_configuration> solve();
+    virtual Array<Col_hpositions> solve();
     Word_wrap(PScore&);
 };
 #endif // BREAK_HH