]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.2
authorfred <fred>
Thu, 10 Oct 1996 10:52:07 +0000 (10:52 +0000)
committerfred <fred>
Thu, 10 Oct 1996 10:52:07 +0000 (10:52 +0000)
qlp.cc
qlp.hh

diff --git a/qlp.cc b/qlp.cc
index 21997f6364c83147ff34bdfbefb2fa5cb3b99871..9ad72de4a030f986e8549f4a11a68f41d4819dab 100644 (file)
--- 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 83938c9ca7ff09c841866e06fbc439d96a86bb9d..54d31910ba4fbf427a36bff0852853ee336dad5d 100644 (file)
--- 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;