2 ineq-constrained-qp.hh -- declare Ineq_constrained_qp
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
10 #ifndef INEQ_CONSTRAINED_QP_HH
11 #define INEQ_CONSTRAINED_QP_HH
17 /// inequality constrained quadratic program
18 class Ineq_constrained_qp {
19 friend class Active_constraints;
30 use a KKT method to assert optimality of sol
32 void assert_solution (Vector sol) const;
33 /// solve the problem using a projected gradient method
34 Vector constraint_solve (Vector) const;
36 Solve it. First try it the easy way.
38 Vector solve (Vector start) const;
41 @return the number of variables in the problem
55 void add_inequality_cons (Vector c, double r);
57 /** set up matrices to go with the problem. */
58 Ineq_constrained_qp (int novars);
61 evaluate the quadratic function for input #v#
65 void eliminate_var (int idx, Real value);
74 #endif // INEQ_CONSTRAINED_QP_HH