[Pkg-javascript-commits] [science.js] 26/87: Minor tweaks.
bhuvan krishna
bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:11:54 UTC 2016
This is an automated email from the git hooks/post-receive script.
bhuvan-guest pushed a commit to branch master
in repository science.js.
commit 4f032e26ed561be1785ca6a36a4acc11785bd747
Author: Jason Davies <jason at jasondavies.com>
Date: Fri Aug 26 00:48:04 2011 +0100
Minor tweaks.
---
science.lin.js | 8 +++++---
science.lin.min.js | 2 +-
src/lin/tridag.js | 8 +++++---
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/science.lin.js b/science.lin.js
index 233dc92..e29a079 100644
--- a/science.lin.js
+++ b/science.lin.js
@@ -14,13 +14,15 @@
science.lin.tridag = function(a, b, c, d, x, n) {
c[0] /= b[0];
d[0] /= b[0];
- for (var i = 1; i < n; i++) {
- var id = 1 / (b[i] - c[i-1] * a[i]);
+ var i,
+ id;
+ for (i = 1; i < n; i++) {
+ id = 1 / (b[i] - c[i-1] * a[i]);
c[i] *= id;
d[i] = (d[i] - d[i - 1] * a[i]) * id;
}
x[n] = d[n];
- for (var i = n - 2; i >= 0; i--) {
+ for (i = n - 2; i >= 0; i--) {
x[i] = d[i] - c[i] * x[i + 1];
}
};
diff --git a/science.lin.min.js b/science.lin.min.js
index ba1b1cb..53458fd 100644
--- a/science.lin.min.js
+++ b/science.lin.min.js
@@ -1 +1 @@
-(function(){science.lin={},science.lin.tridag=function(a,b,c,d,e,f){c[0]/=b[0],d[0]/=b[0];for(var g=1;g<f;g++){var h=1/(b[g]-c[g-1]*a[g]);c[g]*=h,d[g]=(d[g]-d[g-1]*a[g])*h}e[f]=d[f];for(var g=f-2;g>=0;g--)e[g]=d[g]-c[g]*e[g+1]}})()
\ No newline at end of file
+(function(){science.lin={},science.lin.tridag=function(a,b,c,d,e,f){c[0]/=b[0],d[0]/=b[0];var g,h;for(g=1;g<f;g++)h=1/(b[g]-c[g-1]*a[g]),c[g]*=h,d[g]=(d[g]-d[g-1]*a[g])*h;e[f]=d[f];for(g=f-2;g>=0;g--)e[g]=d[g]-c[g]*e[g+1]}})()
\ No newline at end of file
diff --git a/src/lin/tridag.js b/src/lin/tridag.js
index dcc46c3..7b58072 100644
--- a/src/lin/tridag.js
+++ b/src/lin/tridag.js
@@ -13,13 +13,15 @@
science.lin.tridag = function(a, b, c, d, x, n) {
c[0] /= b[0];
d[0] /= b[0];
- for (var i = 1; i < n; i++) {
- var id = 1 / (b[i] - c[i-1] * a[i]);
+ var i,
+ id;
+ for (i = 1; i < n; i++) {
+ id = 1 / (b[i] - c[i-1] * a[i]);
c[i] *= id;
d[i] = (d[i] - d[i - 1] * a[i]) * id;
}
x[n] = d[n];
- for (var i = n - 2; i >= 0; i--) {
+ for (i = n - 2; i >= 0; i--) {
x[i] = d[i] - c[i] * x[i + 1];
}
};
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/science.js.git
More information about the Pkg-javascript-commits
mailing list