mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
small optimization
This commit is contained in:
parent
0a41cc23c1
commit
f9cc184d15
1 changed files with 2 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue