[Pkg-javascript-commits] [science.js] 15/87: Remove cruft from LOESS test.

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:11:53 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 4e4b205d1b82b860d3ceb75c5cb94ef50996dfd5
Author: Jason Davies <jason at jasondavies.com>
Date:   Thu Aug 25 18:37:59 2011 +0100

    Remove cruft from LOESS test.
---
 package.json             |   2 +-
 science.js               |   2 +-
 science.min.js           |   2 +-
 src/core/core.js         |   2 +-
 test/stats/loess-test.js | 179 +----------------------------------------------
 5 files changed, 6 insertions(+), 181 deletions(-)

diff --git a/package.json b/package.json
index d026b60..824540b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "science.js",
-  "version": "1.3.1",
+  "version": "1.3.2",
   "description": "Scientific and statistical computing in JavaScript.",
   "keywords": ["science", "statistics", "mathematics"],
   "homepage": "https://github.com/jasondavies/science.js",
diff --git a/science.js b/science.js
index 91c121b..fc5d82c 100644
--- a/science.js
+++ b/science.js
@@ -1,4 +1,4 @@
-(function(){science = {version: "1.3.1"}; // semver
+(function(){science = {version: "1.3.2"}; // semver
 science.functor = function(v) {
   return typeof v === "function" ? v : function() { return v; };
 };
diff --git a/science.min.js b/science.min.js
index 496d41a..a724200 100644
--- a/science.min.js
+++ b/science.min.js
@@ -1 +1 @@
-(function(){science={version:"1.3.1"},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.zeroes=function(a){var b=-1,c=[];if(arguments.length===1)while(++b<a)c[b]=0;else while(++b<a)c[b]=science.zeroes.apply(this,Array.prototype.slice.call(arguments,1));return c}})()
\ No newline at end of file
+(function(){science={version:"1.3.2"},science.functor=function(a){return typeof a=="function"?a:function(){return a}},science.hypot=function(a,b){a=Math.abs(a),b=Math.abs(b);var c,d;a>b?(c=a,d=b):(c=b,d=a);var e=d/c;return c*Math.sqrt(1+e*e)},science.zeroes=function(a){var b=-1,c=[];if(arguments.length===1)while(++b<a)c[b]=0;else while(++b<a)c[b]=science.zeroes.apply(this,Array.prototype.slice.call(arguments,1));return c}})()
\ No newline at end of file
diff --git a/src/core/core.js b/src/core/core.js
index 8c60305..232fbdb 100644
--- a/src/core/core.js
+++ b/src/core/core.js
@@ -1 +1 @@
-science = {version: "1.3.1"}; // semver
+science = {version: "1.3.2"}; // semver
diff --git a/test/stats/loess-test.js b/test/stats/loess-test.js
index c892ac8..c9cc30c 100644
--- a/test/stats/loess-test.js
+++ b/test/stats/loess-test.js
@@ -1,107 +1,6 @@
 require("../../science");
 require("../../science.stats");
 
-var rnd = [ 0.6939094110857695,
-  0.6404423511121422,
-  0.8878446461167186,
-  0.6462079978082329,
-  0.6637521795928478,
-  0.24493950745090842,
-  0.34250394022092223,
-  0.9755479225423187,
-  0.9374189365189523,
-  0.6031865722034127,
-  0.4876941950060427,
-  0.6098125972785056,
-  0.054338038666173816,
-  0.11183926812373102,
-  0.3354800436645746,
-  0.4134549929294735,
-  0.1017211398575455,
-  0.538322759559378,
-  0.017941900994628668,
-  0.12372139329090714,
-  0.7505403922405094,
-  0.5633547634351999,
-  0.0756064688321203,
-  0.8799725740682334,
-  0.2508433796465397,
-  0.7720114327967167,
-  0.32683586818166077,
-  0.9399276652839035,
-  0.31411432521417737,
-  0.5734551984351128,
-  0.7009459554683417,
-  0.4849966967012733,
-  0.8188675534911454,
-  0.8166951918974519,
-  0.33841507649049163,
-  0.11869120015762746,
-  0.777605889365077,
-  0.2777763591147959,
-  0.35460630315355957,
-  0.32708863937295973,
-  0.2942127166315913,
-  0.6385190833825618,
-  0.021380239631980658,
-  0.6673290475737303,
-  0.45648552291095257,
-  0.05704299663193524,
-  0.8714434707071632,
-  0.9072632407769561,
-  0.8785695717670023,
-  0.82259655254893,
-  0.6796266995370388,
-  0.5748023404739797,
-  0.1122367603238672,
-  0.29573980369605124,
-  0.9275350021198392,
-  0.6814926667138934,
-  0.45445852470584214,
-  0.03944953461177647,
-  0.460483989212662,
-  0.49762112693861127,
-  0.759811864932999,
-  0.7484003549907357,
-  0.9478790136054158,
-  0.44914283021353185,
-  0.8821582859382033,
-  0.6922903275117278,
-  0.24910925677977502,
-  0.3584934144746512,
-  0.15697992639616132,
-  0.1212864457629621,
-  0.5726316482760012,
-  0.13065251475200057,
-  0.1658324128948152,
-  0.1720187719911337,
-  0.21734452084638178,
-  0.6042870571836829,
-  0.6968479482457042,
-  0.7589083178900182,
-  0.014651404926553369,
-  0.9661993009503931,
-  0.9578495547175407,
-  0.9307146456558257,
-  0.952354334294796,
-  0.8339324509724975,
-  0.8491679783910513,
-  0.3204401859547943,
-  0.6246638908050954,
-  0.8314075195230544,
-  0.5874556733760983,
-  0.8385522300377488,
-  0.5662870837841183,
-  0.43287460319697857,
-  0.7698894322384149,
-  0.019310907926410437,
-  0.0235570278018713,
-  0.4205535822547972,
-  0.23326894780620933,
-  0.667146461782977,
-  0.8067880922462791,
-  0.15052578458562493 ];
-
 var vows = require("vows"),
     assert = require("assert");
 
@@ -235,80 +134,6 @@ suite.addBatch({
   }
 });
 
-/*
-
-    @Test
-
-    @Test(expected=MathException.class)
-    public void testUnequalSizeArguments() throws MathException {
-        new LoessInterpolator().smooth(new double[] {1,2,3}, new double[] {1,2,3,4});
-    }
-
-    @Test(expected=MathException.class)
-    public void testEmptyData() throws MathException {
-        new LoessInterpolator().smooth(new double[] {}, new double[] {});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNonStrictlyIncreasing1() throws MathException {
-        new LoessInterpolator().smooth(new double[] {4,3,1,2}, new double[] {3,4,5,6});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNonStrictlyIncreasing2() throws MathException {
-        new LoessInterpolator().smooth(new double[] {1,2,2,3}, new double[] {3,4,5,6});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal1() throws MathException {
-        new LoessInterpolator().smooth(new double[] {1,2,Double.NaN}, new double[] {3,4,5});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal2() throws MathException {
-        new LoessInterpolator().smooth(new double[] {1,2,Double.POSITIVE_INFINITY}, new double[] {3,4,5});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal3() throws MathException {
-        new LoessInterpolator().smooth(new double[] {1,2,Double.NEGATIVE_INFINITY}, new double[] {3,4,5});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal4() throws MathException {
-        new LoessInterpolator().smooth(new double[] {3,4,5}, new double[] {1,2,Double.NaN});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal5() throws MathException {
-        new LoessInterpolator().smooth(new double[] {3,4,5}, new double[] {1,2,Double.POSITIVE_INFINITY});
-    }
-
-    @Test(expected=MathException.class)
-    public void testNotAllFiniteReal6() throws MathException {
-        new LoessInterpolator().smooth(new double[] {3,4,5}, new double[] {1,2,Double.NEGATIVE_INFINITY});
-    }
-
-    @Test(expected=MathException.class)
-    public void testInsufficientBandwidth() throws MathException {
-        LoessInterpolator li = new LoessInterpolator(0.1, 3, 1e-12);
-        li.smooth(new double[] {1,2,3,4,5,6,7,8,9,10,11,12}, new double[] {1,2,3,4,5,6,7,8,9,10,11,12});
-    }
-
-    @Test(expected=MathException.class)
-    public void testCompletelyIncorrectBandwidth1() throws MathException {
-        new LoessInterpolator(-0.2, 3, 1e-12);
-    }
-
-    @Test(expected=MathException.class)
-    public void testCompletelyIncorrectBandwidth2() throws MathException {
-        new LoessInterpolator(1.1, 3, 1e-12);
-    }
-
-    @Test
-
-*/
-
 suite.export(module);
 
 function generateSineData(n, xval, yval, xnoise, ynoise) {
@@ -317,7 +142,7 @@ function generateSineData(n, xval, yval, xnoise, ynoise) {
       i = -1;
   while (++i < n) {
     xval[i] = x;
-    yval[i] = Math.sin(x) + (2 * rnd[i] - 1) * ynoise;
-    x += dx * (1 + (2 * rnd[i] - 1) * xnoise);
+    yval[i] = Math.sin(x) + (2 * Math.random() - 1) * ynoise;
+    x += dx * (1 + (2 * Math.random() - 1) * xnoise);
   }
 }

-- 
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