lilypond-1.5.10
[lilypond.git] / lily / include / linear-programming.hh
blob6ba38eaa5560829ac8d2f913368389b5d7cb1383
1 /*
2 linear-programming.hh -- declare Linear_programming
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
10 #ifndef LINEAR_PROGRAMMING_HH
11 #define LINEAR_PROGRAMMING_HH
13 #include "linear-programming.hh"
15 /**
17 Solve the following problem:
19 min c* x
21 constraints_[i] * x = constraint_rhss_ [i]
23 x[j] >= 0
26 class Linear_programming
28 Array<Vector> constraints_;
29 Array<Real> constraint_rhss_;
30 Vector cost_vec_;
31 int dim_;
32 public:
33 Vector constraint_solve (Vector initial_basic_solution) const;
35 int dim () const;
36 Vector solve (Vector) const;
37 void add_constraint (Vector c, double r);
40 Linear_programming (int n);
41 void set_cost (Vector);
42 void print () const;
43 void OK () const;
46 #endif /* LINEAR_PROGRAMMING_HH */