[Pkg-octave-commit] [SCM] octave-symbolic branch, master, updated. 5bb64de314391ecd797323dc4c6c3e1abe8f8920

Thomas Weber thomas.weber.mail at gmail.com
Thu Dec 31 10:02:27 UTC 2009


The following commit has been merged in the master branch:
commit 0002d2c54d9cd8601342a8a5692bc6e6659a62ab
Author: Thomas Weber <thomas.weber.mail at gmail.com>
Date:   Thu Dec 31 00:40:09 2009 +0100

    Remove patches symfsolve-tests.diff and use-cell-instead-of-list.diff

diff --git a/debian/changelog b/debian/changelog
index a09a623..1bee01d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ octave-symbolic (1.0.8-2) UNRELEASED; urgency=low
   * New upstream release.
   * Use octave-symbolic.docs for installation of documentation, following the
     change in octave-pkg-dev 0.7.1.
+  * Dropped patches (applied upstream):
+    + symfsolve-tests.diff
+    + use-cell-instead-of-list.diff
 
  -- Rafael Laboissiere <rafael at debian.org>  Sun, 07 Jun 2009 21:06:39 +0200
 
diff --git a/debian/patches/series b/debian/patches/series
index 5a9c9e3..8d1c8b6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1 @@
-symfsolve-tests.diff
-use-cell-instead-of-list.diff
+ 
diff --git a/debian/patches/symfsolve-tests.diff b/debian/patches/symfsolve-tests.diff
deleted file mode 100644
index 4f087db..0000000
--- a/debian/patches/symfsolve-tests.diff
+++ /dev/null
@@ -1,26 +0,0 @@
-Add tests to function symfsolve
-
- -- Rafael Laboissiere <rafael at debian.org>  Sat, 23 May 2009 13:07:00 +0200
-
---- a/inst/symfsolve.m
-+++ b/inst/symfsolve.m
-@@ -158,3 +158,19 @@
- 	[x,inf,msg] = fsolve("symfn",X0);
- 
- endfunction
-+
-+%!shared
-+% x = sym ("x");
-+% y = sym ("y");
-+% f = x ^ 2 + 3 * x - 1;
-+% g = x * y - y ^ 2 + 3;
-+%!test
-+% assert (symfsolve (f, g), [0.30278; -1.58727]', 1e-5);
-+%!test
-+% assert (symfsolve (f, g, x, 1, y, 5), [0.30278; 1.89004]', 1e-5);
-+%!test
-+% assert (symfsolve (f, g, {x==1,y==5}), [0.30278; 1.89004]', 1e-5);
-+%!test
-+% assert (symfsolve (f, g, [1 5]), [0.30278; 1.89004]', 1e-5);
-+%!test
-+% assert (symfsolve ({f, g}, {y==1,x==2}), [1.89004; 0.30278]', 1e-5);
diff --git a/debian/patches/use-cell-instead-of-list.diff b/debian/patches/use-cell-instead-of-list.diff
deleted file mode 100644
index 44f5c43..0000000
--- a/debian/patches/use-cell-instead-of-list.diff
+++ /dev/null
@@ -1,145 +0,0 @@
-Use cell() instead of the deprecated list()
-
-The list() function has been deprecated in Octave.  The patch below
-replaces all calls to list() in the scripts poly2sym.m, sym2poly.m,
-and symfsolve.m by calls to cell().
-
-Also, add a new test using cell inf function sym2poly.
-
- -- Rafael Laboissiere <rafael at debian.org>  Sat, 23 May 2009 15:20:50 +0200
-
---- a/inst/poly2sym.m
-+++ b/inst/poly2sym.m
-@@ -19,7 +19,7 @@
- ## @deftypefn {Function File} {} @var{p} = poly2sym (@var{c}, @var{x})
- ## Creates a symbolic polynomial expression @var{p} with coefficients @var{c}.
- ## If @var{p} is not specified, the free variable is set to sym("x"). @var{c}
--## may be a vector or a list/cell-array of symbols. @var{x} may be a symbolic
-+## may be a vector or a cell-array of symbols. @var{x} may be a symbolic
- ## expression or a string.
- ## The coefficients correspond to decreasing exponent of the free variable.
- ##
-@@ -28,7 +28,7 @@
- ## symbols
- ## x=sym("x"); y=sym("y");
- ## p = poly2sym ([2,5,-3]);         # p = 2*x^2+5*x-3
--## c = poly2sym (list(2*y,5,-3),x); # p = 2*y*x^2+5*x-3
-+## c = poly2sym ({2*y,5,-3},x); # p = 2*y*x^2+5*x-3
- ## @end example
- ##
- ## @end deftypefn
-@@ -45,9 +45,9 @@
- 
- N = length(c);
- 
--if !iscell(c) & !islist(c)
-+if !iscell(c)
- 	tmp = c;
--	c = list;
-+	c = cell;
- 	for i=1:N
- 		c(i) = tmp(i);
- 	endfor
---- a/inst/sym2poly.m
-+++ b/inst/sym2poly.m
-@@ -21,7 +21,7 @@
- ## as a vector. If there is only one free variable in @var{p} the
- ## coefficient vector @var{c} is a plain numeric vector. If there is more
- ## than one free variable in @var{p}, a second argument @var{x} specifies the
--## free variable and the function returns a list of symbolic expressions.
-+## free variable and the function returns a cell vector of symbolic expressions.
- ## The coefficients correspond to decreasing exponent of the free variable.
- ##
- ## Example:
-@@ -29,7 +29,7 @@
- ## symbols
- ## x=sym("x"); y=sym("y");
- ## c = sym2poly (x^2+3*x-4);    # c = [1,3,-4]
--## c = sym2poly (x^2+y*x,x);    # c = list(2,y,0)
-+## c = sym2poly (x^2+y*x,x);    # c = {2,y,0}
- ## @end example
- ##
- ## If @var{p} is not a polynomial the result has no warranty.
-@@ -94,7 +94,7 @@
- p = expand(p);
- p_terms = sumterms(p);
- # if this is well behaved, I can find the coefficients by dividing with x
--c_ex = list;
-+c_ex = cell;
- for i=1:length(p_terms)
- 	tmp = p_terms{i};
- 	for j=1:BADPOLY_COEFF_LIMIT
-@@ -146,10 +146,10 @@
- 	c = c_ex;
- endif
- 
--% test examples
-+%!shared
-+% symbols
-+% x=sym("x"); y=sym("y");
- %!test
--%! symbols
--%! x=sym("x"); y=sym("y");
--%! c = sym2poly (x^2+3*x-4);
--%! assert(c, [1,3,-4]);
--
-+% assert(sym2poly (x^2+3*x-4), [1,3,-4]);
-+%!test
-+% assert (sym2poly (x^2+y*x,x), {2,y,0})
---- a/inst/symfsolve.m
-+++ b/inst/symfsolve.m
-@@ -44,7 +44,7 @@
- ## @end example
- ##
- ## The system of equations to solve for can be given as separate arguments or
--## as a single list/cell-array:
-+## as a single cell-array:
- ##
- ## @example
- ## a = symfsolve(@{f,g@},@{y==1,x==2@});  # here y=a(1), x=a(2)
-@@ -52,7 +52,7 @@
- ##
- ## If the variables are not specified explicitly with the initial conditions,
- ## they are placed in alphabetic order. The system of equations can be comma-
--## separated or given in a list or cell-array. The return-values are those of
-+## separated or given in a cell-array. The return-values are those of
- ## fsolve; @var{x} holds the found roots.
- ## @end deftypefn
- ## @seealso{fsolve}
-@@ -65,12 +65,12 @@
- function [ x,inf,msg ] = symfsolve (varargin)
- 
- 	#separate variables and equations
--	eqns = list;
--	vars = list;
-+	eqns = cell();
-+	vars = cell();
- 
--	if iscell(varargin{1}) | islist(varargin{1})
-+	if iscell(varargin{1})
- 		if !strcmp(typeinfo(varargin{1}{1}),"ex")
--			error("First argument must be (a cell-array/list of) symbolic expressions.")
-+			error("First argument must be (a cell-array of) symbolic expressions.")
- 		endif
- 		eqns = varargin{1};
- 		arg_count = 1;
-@@ -78,7 +78,7 @@
- 		arg_count = 0;
- 		for i=1:nargin
- 			tmp = disp(varargin{i});
--			if( iscell(varargin{i}) | islist(varargin{i}) | ...
-+			if( iscell(varargin{i}) | ...
- 					all(isalnum(tmp) | tmp=="_" | tmp==",") | ...
- 					!strcmp(typeinfo(varargin{i}),"ex") )
- 				break;
-@@ -129,8 +129,8 @@
- 		if nvars!=nevars
- 			error("The number of initial conditions does not match the number of free variables.")
- 		endif
--		if iscell(varargin{arg_count+1}) | islist(varargin{arg_count+1})
--			# List/cell-array of relations - this should work for a list of strings ("x==3") too.
-+		if iscell(varargin{arg_count+1})
-+			# cell-array of relations - this should work for a list of strings ("x==3") too.
- 			for i=1:nvars
- 				tmp = disp(varargin{arg_count+1}{i});
- 				vars = append(vars,sym(strtok(tmp,"==")));

-- 
octave-symbolic



More information about the Pkg-octave-commit mailing list