Hello community,

here is the log from the commit of package octave-forge-splines for 
openSUSE:Factory checked in at 2019-11-28 10:14:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-splines (Old)
 and      /work/SRC/openSUSE:Factory/.octave-forge-splines.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "octave-forge-splines"

Thu Nov 28 10:14:56 2019 rev:5 rq:751346 version:1.3.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/octave-forge-splines/octave-forge-splines.changes    
    2017-02-03 17:51:59.483503247 +0100
+++ 
/work/SRC/openSUSE:Factory/.octave-forge-splines.new.26869/octave-forge-splines.changes
     2019-11-28 10:15:22.131637926 +0100
@@ -1,0 +2,8 @@
+Wed Nov 27 12:02:39 UTC 2019 - Stefan BrĂ¼ns <[email protected]>
+
+- Update to version 1.3.3:
+  * Demo and efficiency improvement (and accuracy fix for new fminbnd
+    default settings) in csaps_sel
+  * Bug fix in csape
+
+-------------------------------------------------------------------
@@ -27 +34,0 @@
-

Old:
----
  splines-1.3.2.tar.gz

New:
----
  splines-1.3.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ octave-forge-splines.spec ++++++
--- /var/tmp/diff_new_pack.np5rJw/_old  2019-11-28 10:15:25.043637955 +0100
+++ /var/tmp/diff_new_pack.np5rJw/_new  2019-11-28 10:15:25.047637955 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package octave-forge-splines
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,19 +12,19 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
 %define octpkg  splines
 Name:           octave-forge-%{octpkg}
-Version:        1.3.2
+Version:        1.3.3
 Release:        0
 Summary:        Additional spline functions for Octave
-License:        GPL-2.0+ and GPL-3.0+ and SUSE-Public-Domain
+License:        GPL-2.0-or-later AND GPL-3.0-or-later AND SUSE-Public-Domain
 Group:          Productivity/Scientific/Math
-Url:            http://octave.sourceforge.net
-Source0:        
http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
+URL:            https://octave.sourceforge.io
+Source0:        
https://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRequires:  octave-devel
 Requires:       octave-cli >= 3.6.0

++++++ splines-1.3.2.tar.gz -> splines-1.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/DESCRIPTION 
new/splines-1.3.3/DESCRIPTION
--- old/splines-1.3.2/DESCRIPTION       2016-12-13 15:09:28.274576750 +0100
+++ new/splines-1.3.3/DESCRIPTION       2019-10-23 20:45:53.000000000 +0200
@@ -1,6 +1,6 @@
 Name: splines
-Version: 1.3.2
-Date: 2016-11-23
+Version: 1.3.3
+Date: 2019-10-17
 Author: various authors
 Maintainer: Nir Krakauer <[email protected]>
 Title: Splines.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/NEWS new/splines-1.3.3/NEWS
--- old/splines-1.3.2/NEWS      2016-12-13 15:09:28.274576750 +0100
+++ new/splines-1.3.3/NEWS      2019-10-23 20:45:53.000000000 +0200
@@ -1,6 +1,9 @@
-Summary of important user-visible changes for splines x.x.x:
+Summary of important user-visible changes for splines 1.3.3:
 -------------------------------------------------------------------
 
+ ** Demo and efficiency improvement (and accuracy fix for new fminbnd
+    default settings) in csaps_sel
+ ** Bug fix in csape
 
 Summary of important user-visible changes for splines 1.3.2:
 -------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/inst/csape.m 
new/splines-1.3.3/inst/csape.m
--- old/splines-1.3.2/inst/csape.m      2016-12-13 15:09:28.278576709 +0100
+++ new/splines-1.3.3/inst/csape.m      2019-10-23 20:45:53.000000000 +0200
@@ -68,6 +68,10 @@
   endif
   m = size (a, 2);
 
+  if exist("valc", "var") && size(valc) == [1 2]
+    valc = valc';
+  endif
+
   b = c = zeros (n, m);
   h = diff (x);
   idx = ones (columns(a),1);
@@ -94,7 +98,7 @@
       A(1, 2) = h(1);
       A(n, n) = 2 * h(end);
       A(end, end-1) = h(end);
-      g = [3*(d(1, :) - valc(1)); g; 3*(valc(2) - d(end, :))];
+      g = [3*(d(1, :) - valc(1, :)); g; 3*(valc(2, :) - d(end, :))];
       c = A \ g;
     else
       dg = 2 * (h(1:n - 2) .+ h(2:n - 1));
@@ -106,8 +110,8 @@
       g = 3 * diff (a(2:n,:)) ./ h(2:n - 1,idx)...
         - 3 * diff (a(1:n - 1,:)) ./ h(1:n - 2,idx);
       g(1,:) = 3 * (a(3,:) - a(2,:)) / h(2) ...
-          - 3 / 2 * (3 * (a(2,:) - a(1,:)) / h(1) - valc(1));
-      g(n - 2,:) = 3 / 2 * (3 * (a(n,:) - a(n - 1,:)) / h(n - 1) - valc(2))...
+          - 3 / 2 * (3 * (a(2,:) - a(1,:)) / h(1) - valc(1,:));
+      g(n - 2,:) = 3 / 2 * (3 * (a(n,:) - a(n - 1,:)) / h(n - 1) - 
valc(2,:))...
           - 3 * (a(n - 1,:) - a(n - 2,:)) / h(n - 2);
 
       c(2:n - 1,:) = spdiags([[e(:);0],dg,[0;e(:)]],[-1,0,1],n-2,n-2) \ g;
@@ -238,7 +242,7 @@
 endfunction
 
 
-%!shared x,x2,y,cond,pp,h,valc
+%!shared x,x2,y,cond,pp,pp1,pp2,h,valc
 %! x = linspace(0,2*pi,5); y = sin(x); x2 = linspace(0,2*pi,16);
 
 %!assert (ppval(csape(x,y),x), y, 10*eps);
@@ -303,12 +307,24 @@
 %!assert (ppval(csape(x(1:4)',y(1:4)',cond),x(1:4)), y(1:4), 10*eps);
 
 %!test cond='complete';
-%! h = pi/4; n = 3; x = linspace(0,(n-1)*h,n); y = sin(x); valc = cos([x(1) 
x(end)]); pp = csape(x, y, cond, valc);
-%!assert (ppval(csape(x,[y;y],cond, valc),x),  ...
-%!        repmat(ppval(pp, x), [2 1]), 10*eps)
-%!assert (polyval(pp.coefs(1, :), [0 h]), y(1:2), 10*eps)
-%!assert (polyval(pp.coefs(2, :), [0 h]), y(2:3), 10*eps)
+%! h = pi/6; n = 3; x = linspace(0,(n-1)*h,n)'; y = sin(x); valc = cos([x(1) 
x(end)]); pp = csape(x, y, cond, valc);
+%!assert (ppval(csape(x,[y y],cond, valc),x)',  ...
+%!        repmat(ppval(pp, x), [1 2]), 10*eps)
+%!assert (polyval(pp.coefs(1, :), [0 h])', y(1:2), 10*eps)
+%!assert (polyval(pp.coefs(2, :), [0 h])', y(2:3), 10*eps)
 %!assert (polyval([3*pp.coefs(1, 1) 2*pp.coefs(1, 2) pp.coefs(1, 3)], 0), 
valc(1), 10*eps)
 %!assert (polyval([3*pp.coefs(2, 1) 2*pp.coefs(2, 2) pp.coefs(2, 3)], h), 
valc(2), 10*eps)
 %!assert (polyval([3*pp.coefs(1, 1) 2*pp.coefs(1, 2) pp.coefs(1, 3)], h), 
polyval([3*pp.coefs(2, 1) 2*pp.coefs(2, 2) pp.coefs(2, 3)], 0), 10*eps)
 %!assert (polyval([6*pp.coefs(1, 1) 2*pp.coefs(1, 2)], h), 
polyval([6*pp.coefs(2, 1) 2*pp.coefs(2, 2)], 0), 10*eps)
+%! y = cos(x); valc = -sin([x(1) x(end)]); pp1 = csape(x, y, cond, valc);
+%!assert (ppval(csape(x,[y y],cond, valc),x)',  ...
+%!        repmat(ppval(pp1, x), [1 2]), 10*eps)
+%!assert (polyval(pp1.coefs(1, :), [0 h])', y(1:2), 10*eps)
+%!assert (polyval(pp1.coefs(2, :), [0 h])', y(2:3), 10*eps)
+%!assert (polyval([3*pp1.coefs(1, 1) 2*pp1.coefs(1, 2) pp1.coefs(1, 3)], 0), 
valc(1), 10*eps)
+%!assert (polyval([3*pp1.coefs(2, 1) 2*pp1.coefs(2, 2) pp1.coefs(2, 3)], h), 
valc(2), 10*eps)
+%!assert (polyval([3*pp1.coefs(1, 1) 2*pp1.coefs(1, 2) pp1.coefs(1, 3)], h), 
polyval([3*pp1.coefs(2, 1) 2*pp1.coefs(2, 2) pp1.coefs(2, 3)], 0), 10*eps)
+%!assert (polyval([6*pp1.coefs(1, 1) 2*pp1.coefs(1, 2)], h), 
polyval([6*pp1.coefs(2, 1) 2*pp1.coefs(2, 2)], 0), 10*eps)
+%! y = [sin(x) cos(x)]; valc = [cos([x(1); x(end)]) -sin([x(1); x(end)])]; pp2 
= csape(x, y, cond, valc);
+%!assert (pp2.coefs([1 3], :), pp.coefs)
+%!assert (pp2.coefs([2 4], :), pp1.coefs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/inst/csaps_sel.m 
new/splines-1.3.3/inst/csaps_sel.m
--- old/splines-1.3.2/inst/csaps_sel.m  2016-12-13 15:09:28.278576709 +0100
+++ new/splines-1.3.3/inst/csaps_sel.m  2019-10-23 20:45:53.000000000 +0200
@@ -1,4 +1,4 @@
-## Copyright (C) 2012 Nir Krakauer
+## Copyright (C) 2012-2018 Nir Krakauer
 ##
 ## This program is free software; you can redistribute it and/or modify it 
under
 ## the terms of the GNU General Public License as published by the Free 
Software
@@ -124,7 +124,11 @@
 
   if ~exist("p", "var")
     ##choose p by minimizing the penalty function
-    p = fminbnd(penalty_function, 0, 1);
+    ##minimize over pt = log(-log(p)+1) to find p with good fractional 
accuracy if the optimum is very small, without making TolX very small
+    tol_pt = 1E-6;
+    pt_max = log(-log(realmin)+1) + 2*tol_pt;
+    pt = fminbnd(@(pt) penalty_function(exp(1-exp(pt))), 0, pt_max, optimset 
("TolX", tol_pt));
+    p = exp(1-exp(pt));
   endif
 
   ## estimate the trend uncertainty
@@ -262,6 +266,19 @@
 %!assert (ret, (csaps_sel(x,[y 2*y],x))'(:, 1), 1E-4);
 %!assert (unc_y, zeros(size(unc_y)), 1E-5);
 
+%!demo
+%! ni = 400; #number of evaluation points
+%! n = 40; #number of given sample points
+%! f = @(x) sin (2*pi*x); #function generating the synthetic data
+%! x = sort (rand (n, 1)); #sampled points
+%! y = f(x) + 0.1*randn (n, 1);
+%! xi = linspace (0, 1, ni); #evaluation points
+%! yi = csaps_sel (x,y,xi,[],'aicc');
+%! plot (x, y, 's', xi, yi)
+%! grid on
+%! legend ('Given data', 'Spline fit')
+%! title ('Spline smoothing with synthetic data sampled from sine wave with 
noise')
+
 %{
 #experiments comparing different selection criteria for recovering a function 
sampled with standard normal noise -- aicc was consistently better than aic, 
but otherwise which method does best is problem-specific
 tic
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/inst/tpaps.m 
new/splines-1.3.3/inst/tpaps.m
--- old/splines-1.3.2/inst/tpaps.m      2016-12-13 15:09:28.282576667 +0100
+++ new/splines-1.3.3/inst/tpaps.m      2019-10-23 20:45:53.000000000 +0200
@@ -153,6 +153,6 @@
 %!shared x,y
 %! x = ([1:10 10.5 11.3])'; y = sin(x);
 %!assert (tpaps(x,y,1,x), y, 1E3*eps);
-%! x = rand(100, 2)*2 - 1; 
+%! x = ((1 ./ (1:100))' - 0.5) * ([0.2 0.6]);
 %! y = x(:, 1) .^ 2 + x(:, 2) .^ 2;
 %!assert (tpaps(x,y,1,x), y, 1E-10);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/splines-1.3.2/inst/tps_val.m 
new/splines-1.3.3/inst/tps_val.m
--- old/splines-1.3.2/inst/tps_val.m    2016-12-13 15:09:28.282576667 +0100
+++ new/splines-1.3.3/inst/tps_val.m    2019-10-23 20:45:53.000000000 +0200
@@ -80,9 +80,8 @@
 %! x = ([1:10 10.5 11.3])'; y = sin(x);
 %! c = tpaps(x,y,1);
 %!assert (tpaps(x,y,1,x), tps_val(x,c,x), 100*eps);
-%! x = rand(100, 2)*2 - 1; 
+%! x = ((1 ./ (1:100))' - 0.5) * ([0.2 0.6]);
 %! y = x(:, 1) .^ 2 + x(:, 2) .^ 2;
 %! c = tpaps(x,y,1);
 %!assert (tpaps(x,y,1,x), tps_val(x,c,x), 100*eps);
-%! xi = rand(30, 2);
 %!assert (tps_val(x,c,x,true), tps_val(x,c,x,false), 100*eps);


Reply via email to