From: fred Date: Thu, 10 Oct 1996 10:52:07 +0000 (+0000) Subject: lilypond-0.0.2 X-Git-Tag: release/1.5.59~7125 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=86764a3dbf3f7b5d5e5ff32d5a9a0be85b3c8b42;p=lilypond.git lilypond-0.0.2 --- diff --git a/qlp.cc b/qlp.cc index 21997f6364..9ad72de4a0 100644 --- a/qlp.cc +++ b/qlp.cc @@ -9,9 +9,8 @@ Mixed_qp::add_equality_cons(Vector v, double r) void Mixed_qp::add_fixed_var(int i, Real r) { - - eq_cons.add(i); - eq_consrhs.add(r); + eq_cons.add(i); + eq_consrhs.add(r); } void Ineq_constrained_qp::add_inequality_cons(Vector c, double r) @@ -38,7 +37,7 @@ Ineq_constrained_qp::OK()const Real Ineq_constrained_qp::eval (Vector v) { - return v * quad * v + lin * v ; + return v * quad * v + lin * v + const_term; } /* eliminate appropriate variables, until we have a Ineq_constrained_qp @@ -50,7 +49,7 @@ Ineq_constrained_qp::eval (Vector v) Vector Mixed_qp::solve(Vector start) const { - + print(); Ineq_constrained_qp pure(*this); for (int i= eq_cons.sz()-1; i>=0; i--) { diff --git a/qlp.hh b/qlp.hh index 83938c9ca7..54d31910ba 100644 --- a/qlp.hh +++ b/qlp.hh @@ -12,7 +12,7 @@ class Ineq_constrained_qp { public: Matrix quad; Vector lin; - + Real const_term; /// void assert_solution(Vector sol) const;