]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/qlpsolve.cc
release: 0.1.24
[lilypond.git] / lily / qlpsolve.cc
index b863a63f67069a991dabff491f912f7b72cd7362..7baa0a1a4a70dd8dfa0675c9a05e4a159d14c1b8 100644 (file)
@@ -20,13 +20,13 @@ String
 Active_constraints::status() const
 {
   String s ("Active|Inactive [");
-  for (int i=0; i< active.size(); i++) 
+  for (int i=0; i< active.size(); i++)
     {
       s += String (active[i]) + " ";
     }
 
   s+="| ";
-  for (int i=0; i< inactive.size(); i++) 
+  for (int i=0; i< inactive.size(); i++)
     {
       s += String (inactive[i]) + " ";
     }
@@ -48,12 +48,12 @@ Active_constraints::OK()
 
   for (int i=0; i < opt->cons.size(); i++)
     allcons.push (0);
-  for (int i=0; i < active.size(); i++) 
+  for (int i=0; i < active.size(); i++)
     {
       int j = active[i];
       allcons[j]++;
     }
-  for (int i=0; i < inactive.size(); i++) 
+  for (int i=0; i < inactive.size(); i++)
     {
       int j = inactive[i];
       allcons[j]++;
@@ -84,7 +84,7 @@ Active_constraints::add (int k)
   Vector Ha = H*a;
   Real aHa = a*Ha;
   Vector addrow (Ha.dim());
-  if (abs (aHa) > EPS) 
+  if (abs (aHa) > EPS)
     {
       /*
        a != 0, so if Ha = O(EPS), then
@@ -93,7 +93,7 @@ Active_constraints::add (int k)
        if H*a == 0, the constraints are dependent.
          */
       H -= Matrix (Ha/aHa , Ha);
-  
+
 
       /*
          sorry, don't know how to justify this. ..
@@ -103,7 +103,7 @@ Active_constraints::add (int k)
       A -= Matrix (A*a, addrow);
       A.insert_row (addrow,A.rows());
     }else
-      WARN << "degenerate constraints";
+      WARN << _("degenerate constraints");
 }
 
 void
@@ -118,22 +118,22 @@ Active_constraints::drop (int k)
   active.pop();
 
   Vector a (A.row (q));
-  if (a.norm() > EPS) 
+  if (a.norm() > EPS)
     {
       /*
-        
+
        */
       Real q = a*opt->quad*a;
       Matrix aaq (a,a/q);
       H += aaq;
       A -= A*opt->quad*aaq;
     }else
-      WARN << "degenerate constraints";
+      WARN << _("degenerate constraints");
 #ifndef NDEBUG
   Vector rem_row (A.row (q));
   assert (rem_row.norm() < EPS);
 #endif
-   
+
   A.delete_row (q);
 }
 
@@ -155,11 +155,10 @@ Active_constraints::Active_constraints (Ineq_constrained_qp const *op)
 }
 
 /** Find the optimum which is in the planes generated by the active
-  constraints.        
+  constraints.
   */
 Vector
 Active_constraints::find_active_optimum (Vector g)
 {
   return H*g;
 }
-