[Pkg-octave-commit] [SCM] octave-statistics branch, master, updated. 9340b8d92a3656d8adf7198b7d7d01f7ae86b4da

Thomas Weber thomas.weber.mail at gmail.com
Fri Jan 15 23:19:54 UTC 2010


The following commit has been merged in the master branch:
commit 0973aa4f935270d1079ce4e23886faca11e7e859
Author: Thomas Weber <thomas.weber.mail at gmail.com>
Date:   Wed Jan 13 00:54:17 2010 +0100

    Drop patch fix-pdist-test.diff, applied upstream

diff --git a/debian/changelog b/debian/changelog
index 322a676..42b1de5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
-octave-statistics (1.0.8-2) UNRELEASED; urgency=low
+octave-statistics (1.0.9-1) UNRELEASED; urgency=low
 
+  [ Rafael Laboissiere ]
   * debian/patches/fix-pdist-test.diff: Add patch for making the tests of
     function pdist succeed
   * debian/control: Build-depend on octave-pkg-dev >= 0.7.0, such that the
     package is built against octave3.2
+  
+  [ Thomas Weber ]
+  * New upstream release 
+  * Drop patch fix-pdist-test.diff, applied upstream
 
  -- Rafael Laboissiere <rafael at debian.org>  Mon, 01 Jun 2009 09:32:02 +0200
 
diff --git a/debian/patches/fix-pdist-test.diff b/debian/patches/fix-pdist-test.diff
deleted file mode 100644
index b29d718..0000000
--- a/debian/patches/fix-pdist-test.diff
+++ /dev/null
@@ -1,138 +0,0 @@
-This patch makes the tests of function pdist succeed.  It was taken
-from the upstream SVN repository at:
-
-    http://octave.svn.sourceforge.net/viewvc/octave?view=rev&revision=5884
-
-with the following commit message:
-
-    Author:  fpoto (Francesco Potortì)
-    Date:    Sun May 31 23:27:35 2009 UTC (8 hours, 12 minutes ago)
-    Log Message:     
-
-    Apparently an old version was committed.
-
-    Now useless ", 1" strings are removed from var, cor, sum, abs,
-    Errors for 1-D vectors are not called any more.
-
- -- Rafael Laboissiere <rafael at debian.org>  Mon, 01 Jun 2009 09:32:02 +0200
-
---- a/inst/pdist.m
-+++ b/inst/pdist.m
-@@ -21,8 +21,8 @@
- ##
- ## Return the distance between any two rows in @var{x}.
- ##
--## @var{x} is the @var{n}x at var{d} matrix representing @var{q} row vectors of
--## size @var{d}.
-+## @var{x} is the @var{n}x at var{d} matrix representing @var{q} row
-+## vectors of size @var{d}.
- ##
- ## The output is a dissimilarity matrix formatted as a row vector
- ## @var{y}, @math{(n-1)*n/2} long, where the distances are in
-@@ -112,6 +112,10 @@
-   endif
- 
-   y = [];
-+  if (rows(x) == 1)
-+    return;
-+  endif
-+
-   if (ischar (metric))
-     order = nchoosek(1:rows(x),2);
-     Xi = order(:,1);
-@@ -120,73 +124,71 @@
-     metric = lower (metric);
-     switch (metric)
-       case "euclidean"
--	diff = X(:,Xi) - X(:,Yi);
-+	d = X(:,Xi) - X(:,Yi);
- 	if (str2num(version()(1:3)) > 3.1)
--	  y = norm (diff, "cols");
-+	  y = norm (d, "cols");
- 	else
--	  y = sqrt (sumsq (diff, 1));
-+	  y = sqrt (sumsq (d));
- 	endif
- 
-       case "seuclidean"
--	diff = X(:,Xi) - X(:,Yi);
--	weights = inv (diag (var (x, 1)));
--	y = sqrt (sum ((weights * diff) .* diff, 1));
-+	d = X(:,Xi) - X(:,Yi);
-+	weights = inv (diag (var (x)));
-+	y = sqrt (sum ((weights * d) .* d));
- 
-       case "mahalanobis"
--	diff = X(:,Xi) - X(:,Yi);
-+	d = X(:,Xi) - X(:,Yi);
- 	weights = inv (cov (x));
--	y = sqrt (sum ((weights * diff) .* diff, 1));
-+	y = sqrt (sum ((weights * d) .* d));
- 
-       case "cityblock"
--	diff = X(:,Xi) - X(:,Yi);
-+	d = X(:,Xi) - X(:,Yi);
- 	if (str2num(version()(1:3)) > 3.1)
--	  y = norm (diff, 1, "cols");
-+	  y = norm (d, 1, "cols");
- 	else
--	  y = sum (abs (diff), 1);
-+	  y = sum (abs (d));
- 	endif
- 
-       case "minkowski"
--	diff = X(:,Xi) - X(:,Yi);
-+	d = X(:,Xi) - X(:,Yi);
- 	p = 2;			# default
- 	if (nargin > 2)
- 	  p = varargin{1};	# explicitly assigned
- 	endif;
- 	if (str2num(version()(1:3)) > 3.1)
--	  y = norm (diff, p, "cols");
-+	  y = norm (d, p, "cols");
- 	else
--	  y = (sum ((abs (diff)).^p, 1)).^(1/p);
-+	  y = (sum ((abs (d)).^p)).^(1/p);
- 	endif
- 
-       case "cosine"
- 	prod = X(:,Xi) .* X(:,Yi);
--	weights = sumsq (X(:,Xi), 1) .* sumsq (X(:,Yi), 1);
-+	weights = sumsq (X(:,Xi)) .* sumsq (X(:,Yi));
- 	y = 1 - sum (prod) ./ sqrt (weights);
- 
-       case "correlation"
--	error ("pdist: cannot compute correlation distance between 1-D vectors")
- 	corr = cor (X);
- 	y = 1 - corr (sub2ind (size (corr), Xi, Yi))';
- 
-       case "spearman"
--	error ("pdist: cannot compute spearman distance between 1-D vectors")
- 	corr = spearman (X);
- 	y = 1 - corr (sub2ind (size (corr), Xi, Yi))';
- 
-       case "hamming"
--	diff = logical (X(:,Xi) - X(:,Yi));
--	y = sum (diff, 1) / rows (X);
-+	d = logical (X(:,Xi) - X(:,Yi));
-+	y = sum (d) / rows (X);
- 
-       case "jaccard"
--	diff = logical (X(:,Xi) - X(:,Yi));
-+	d = logical (X(:,Xi) - X(:,Yi));
- 	weights = X(:,Xi) | X(:,Yi);
--	y = sum (diff & weights, 1) ./ sum (weights, 1);
-+	y = sum (d & weights) ./ sum (weights);
- 
-       case "chebychev"
--	diff = X(:,Xi) - X(:,Yi);
-+	d = X(:,Xi) - X(:,Yi);
- 	if (str2num(version()(1:3)) > 3.1)
--	  y = norm (diff, Inf, "cols");
-+	  y = norm (d, Inf, "cols");
- 	else
--	  y = max (abs (diff), 1);
-+	  y = max (abs (d));
- 	endif
- 
-     endswitch
diff --git a/debian/patches/series b/debian/patches/series
index 57f96e2..68a7154 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
 data-files-for-tests.diff
-fix-pdist-test.diff

-- 
octave-statistics



More information about the Pkg-octave-commit mailing list