]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/qlp.hh
release: 0.0.78
[lilypond.git] / lily / include / qlp.hh
index 3c026581eb4dbc0bae19e9233b639810b1b99777..defcd3ee63fcbcb1ab90774f936ab9ee73c57c1a 100644 (file)
@@ -9,60 +9,7 @@
 #ifndef QLP_HH
 #define QLP_HH
 
-#include "matrix.hh"
-
-/// inequality constrained quadratic program
-class Ineq_constrained_qp {
-    friend class Active_constraints;
-
-    Array<Vector> cons;
-    Array<Real> consrhs;
-public:
-    Matrix quad;
-    Vector lin;
-    Real const_term;
-
-
-    /**
-      use a KKT method to assert optimality of sol
-      */
-    void assert_solution(Vector sol) const;
-    /// solve the problem using a projected gradient method
-    Vector solve(Vector start) const;
-    
-    /**
-      @return the number of variables in the problem
-      */
-    int dim() const{
-       return lin.dim();
-    }
-
-    /**
-      add a constraint
-
-
-        c*vars >= r
-
-      PRE
-      c.dim() == dim();
-       
-      */
-    void add_inequality_cons(Vector c, double r);
-    
-    /** set up matrices to go with the problem. */
-    Ineq_constrained_qp(int novars);
-    
-    /**
-    evaluate the quadratic function for input #v#
-    */
-    Real eval(Vector v);
-
-    void eliminate_var(int idx, Real value);
-    void OK()const;
-    void print() const;
-
-};
-
+#include "ineq-constrained-qp.hh"
 
 /**
    Quadratic programming with mixed linear constraints.