2 ineq-constrained-qp.hh -- declare Ineq_constrained_qp
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 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 solve(Vector start) const;
37 @return the number of variables in the problem
53 void add_inequality_cons(Vector c, double r);
55 /** set up matrices to go with the problem. */
56 Ineq_constrained_qp(int novars);
59 evaluate the quadratic function for input #v#
63 void eliminate_var(int idx, Real value);
72 #endif // INEQ_CONSTRAINED_QP_HH