[Pkg-javascript-commits] [science.js] 14/87: Make accuracy configurable for LOESS.

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 0c7b52679765d3ead2390c1d269cdcc8fc459d1a
Author: Jason Davies <jason at jasondavies.com>
Date:   Thu Aug 25 18:32:08 2011 +0100

    Make accuracy configurable for LOESS.
---
 package.json         | 2 +-
 science.js           | 2 +-
 science.min.js       | 2 +-
 science.stats.js     | 6 ++++++
 science.stats.min.js | 2 +-
 src/core/core.js     | 2 +-
 src/stats/loess.js   | 6 ++++++
 7 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/package.json b/package.json
index 0af35c7..d026b60 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "science.js",
-  "version": "1.3.0",
+  "version": "1.3.1",
   "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 db31d89..91c121b 100644
--- a/science.js
+++ b/science.js
@@ -1,4 +1,4 @@
-(function(){science = {version: "1.3.0"}; // semver
+(function(){science = {version: "1.3.1"}; // semver
 science.functor = function(v) {
   return typeof v === "function" ? v : function() { return v; };
 };
diff --git a/science.min.js b/science.min.js
index b335fb7..496d41a 100644
--- a/science.min.js
+++ b/science.min.js
@@ -1 +1 @@
-(function(){science={version:"1.3.0"},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.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
diff --git a/science.stats.js b/science.stats.js
index 57b6b60..a0ac7d3 100644
--- a/science.stats.js
+++ b/science.stats.js
@@ -243,6 +243,12 @@ science.stats.loess = function() {
     return smooth;
   };
 
+  smooth.accuracy = function(x) {
+    if (!arguments.length) return x;
+    accuracy = x;
+    return smooth;
+  };
+
   return smooth;
 };
 
diff --git a/science.stats.min.js b/science.stats.min.js
index cad1865..c7d867c 100644
--- a/science.stats.min.js
+++ b/science.stats.min.js
@@ -1 +1 @@
-(function(){function e(a,b){var c=b+1;while(c<a.length&&a[c]===0)c++;return c}function d(a,b,c,d){var f=d[0],g=d[1],h=e(b,g);if(h<a.length&&a[h]-a[c]<a[c]-a[f]){var i=e(b,f);d[0]=i,d[1]=h}}function c(a){return(a=1-a*a*a)*a*a}function b(a){var b=a.length,c=0;while(++c<b)if(a[c-1]>=a[c])return!1;return!0}function a(a){var b=a.length,c=-1;while(++c<b)if(!isFinite(a[c]))return!1;return!0}science.stats={},science.stats.bandwidth={nrd0:function(a){var b=Math.sqrt(science.stats.variance(a));(lo [...]
\ No newline at end of file
+(function(){function e(a,b){var c=b+1;while(c<a.length&&a[c]===0)c++;return c}function d(a,b,c,d){var f=d[0],g=d[1],h=e(b,g);if(h<a.length&&a[h]-a[c]<a[c]-a[f]){var i=e(b,f);d[0]=i,d[1]=h}}function c(a){return(a=1-a*a*a)*a*a}function b(a){var b=a.length,c=0;while(++c<b)if(a[c-1]>=a[c])return!1;return!0}function a(a){var b=a.length,c=-1;while(++c<b)if(!isFinite(a[c]))return!1;return!0}science.stats={},science.stats.bandwidth={nrd0:function(a){var b=Math.sqrt(science.stats.variance(a));(lo [...]
\ No newline at end of file
diff --git a/src/core/core.js b/src/core/core.js
index c5e29a7..8c60305 100644
--- a/src/core/core.js
+++ b/src/core/core.js
@@ -1 +1 @@
-science = {version: "1.3.0"}; // semver
+science = {version: "1.3.1"}; // semver
diff --git a/src/stats/loess.js b/src/stats/loess.js
index a070d8f..483bb3e 100644
--- a/src/stats/loess.js
+++ b/src/stats/loess.js
@@ -143,6 +143,12 @@ science.stats.loess = function() {
     return smooth;
   };
 
+  smooth.accuracy = function(x) {
+    if (!arguments.length) return x;
+    accuracy = x;
+    return smooth;
+  };
+
   return smooth;
 };
 

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