[Pkg-javascript-commits] [science.js] 32/87: Make hcluster distance configurable.

bhuvan krishna bhuvan-guest at moszumanska.debian.org
Thu Dec 8 06:11:55 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 e43013293ffe52a0de731864a9ef6819884e1391
Author: Jason Davies <jason at jasondavies.com>
Date:   Sat Aug 27 14:58:50 2011 +0100

    Make hcluster distance configurable.
---
 science.stats.js      | 6 ++++++
 science.stats.min.js  | 2 +-
 src/stats/hcluster.js | 6 ++++++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/science.stats.js b/science.stats.js
index a1a8b59..e6eccf3 100644
--- a/science.stats.js
+++ b/science.stats.js
@@ -387,6 +387,12 @@ science.stats.hcluster = function() {
     return root;
   }
 
+  hcluster.distance = function(x) {
+    if (!arguments.length) return distance;
+    distance = x;
+    return hcluster;
+  };
+
   return hcluster;
 };
 
diff --git a/science.stats.min.js b/science.stats.min.js
index 4cf4ddc..d086072 100644
--- a/science.stats.min.js
+++ b/science.stats.min.js
@@ -1 +1 @@
-(function(){function h(a,b){var c=b+1;while(c<a.length&&a[c]===0)c++;return c}function g(a,b,c,d){var e=d[0],f=d[1],g=h(b,f);if(g<a.length&&a[g]-a[c]<a[c]-a[e]){var i=h(b,e);d[0]=i,d[1]=g}}function f(a){return(a=1-a*a*a)*a*a}function e(a){var b=a.length,c=0;while(++c<b)if(a[c-1]>=a[c])return!1;return!0}function d(a){var b=a.length,c=-1;while(++c<b)if(!isFinite(a[c]))return!1;return!0}function c(a,b,c,d){var e=[],f=a+c,g=b.length,h=-1;while(++h<g)e[h]=(a*b[h]+c*d[h])/f;return e}function b [...]
\ No newline at end of file
+(function(){function h(a,b){var c=b+1;while(c<a.length&&a[c]===0)c++;return c}function g(a,b,c,d){var e=d[0],f=d[1],g=h(b,f);if(g<a.length&&a[g]-a[c]<a[c]-a[e]){var i=h(b,e);d[0]=i,d[1]=g}}function f(a){return(a=1-a*a*a)*a*a}function e(a){var b=a.length,c=0;while(++c<b)if(a[c-1]>=a[c])return!1;return!0}function d(a){var b=a.length,c=-1;while(++c<b)if(!isFinite(a[c]))return!1;return!0}function c(a,b,c,d){var e=[],f=a+c,g=b.length,h=-1;while(++h<g)e[h]=(a*b[h]+c*d[h])/f;return e}function b [...]
\ No newline at end of file
diff --git a/src/stats/hcluster.js b/src/stats/hcluster.js
index a28f9ce..9ab7bc4 100644
--- a/src/stats/hcluster.js
+++ b/src/stats/hcluster.js
@@ -101,6 +101,12 @@ science.stats.hcluster = function() {
     return root;
   }
 
+  hcluster.distance = function(x) {
+    if (!arguments.length) return distance;
+    distance = x;
+    return hcluster;
+  };
+
   return hcluster;
 };
 

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