small optimization

This commit is contained in:
Val Erastov 2015-08-13 01:06:07 -07:00
parent 0a41cc23c1
commit f9cc184d15

View file

@ -314,14 +314,13 @@ optim.dog_leg = function (subsys, rough) {
function lsolve(A, b) {
if (csize < xsize) {
var At = n.transpose(A);
var sol = n.solve(n.dot(A, At), b);
var sol = n.solve(n.dot(A, At), b, true);
return n.dot(At, sol);
} else {
return n.solve(A, b);
return n.solve(A, b, false);
}
}
var g = n.dot(n.transpose(Jx), fx);
// get the infinity norm fx_inf and g_inf
var g_inf = n.norminf(g);