From: <car...@us...> - 2012-04-19 10:02:02
|
Revision: 10294 http://octave.svn.sourceforge.net/octave/?rev=10294&view=rev Author: carandraug Date: 2012-04-19 10:01:50 +0000 (Thu, 19 Apr 2012) Log Message: ----------- linear-algebra: update license to GPLv3+ Modified Paths: -------------- trunk/octave-forge/main/linear-algebra/DESCRIPTION trunk/octave-forge/main/linear-algebra/inst/cartprod.m trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m trunk/octave-forge/main/linear-algebra/inst/cod.m trunk/octave-forge/main/linear-algebra/inst/condeig.m trunk/octave-forge/main/linear-algebra/inst/funm.m trunk/octave-forge/main/linear-algebra/inst/lobpcg.m trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m trunk/octave-forge/main/linear-algebra/inst/rotparams.m trunk/octave-forge/main/linear-algebra/inst/rotv.m trunk/octave-forge/main/linear-algebra/inst/smwsolve.m trunk/octave-forge/main/linear-algebra/inst/thfm.m trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h trunk/octave-forge/main/linear-algebra/src/gsvd.cc trunk/octave-forge/main/linear-algebra/src/pgmres.cc Modified: trunk/octave-forge/main/linear-algebra/DESCRIPTION =================================================================== --- trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/DESCRIPTION 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,12 +1,12 @@ -Name: Linear-Algebra +Name: Linear-algebra Version: 2.1.0 Date: 2011-11-06 -Author: Various Authors -Maintainer: The Octave Community -Title: Linear Algebra. +Author: various authors +Maintainer: Octave-Forge community <oct...@li...> +Title: Linear algebra. Description: Additional linear algebra code, including general SVD and matrix functions. -Categories: Linear-Algebra +Categories: Linear algebra Depends: octave (>= 3.2.3), general (>= 1.3.0) Autoload: no -License: GPL version 3 or later +License: GPLv3+, LGPLv3+ Url: http://octave.sf.net Modified: trunk/octave-forge/main/linear-algebra/inst/cartprod.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/cartprod.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/cartprod.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,21 +1,21 @@ ## Copyright (C) 2008 Muthiah Annamalai <mut...@ut...> ## Copyright (C) 2010 VZLU Prague -## -## 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 Foundation; either version 3 of the License, or -## (at your option) any later version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} cartprod (@var{varargin} ) +## @deftypefn {Function File} {} cartprod (@var{varargin}) ## ## Computes the cartesian product of given column vectors ( row vectors ). ## The vector elements are assumend to be numbers. @@ -56,6 +56,4 @@ endfunction -%! %!assert(cartprod(1:2,0:1),[1 0; 2 0; 1 1; 2 1]) -%! Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_eig.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,21 +1,21 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## 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 Foundation; either version 2 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{lambda}] =} circulant_eig (@var{v}) -## @deftypefnx{Function File}{[@var{vs}, @var{lambda}] =} circulant_eig (@var{v}) +## @deftypefn{Function File} {@var{lambda} =} circulant_eig (@var{v}) +## @deftypefnx{Function File} {[@var{vs}, @var{lambda}] =} circulant_eig (@var{v}) ## ## Fast, compact calculation of eigenvalues and eigenvectors of a circulant matrix@* ## Given an @var{n}*1 vector @var{v}, return the eigenvalues @var{lambda} and optionally eigenvectors @var{vs} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column @@ -24,35 +24,30 @@ ## ## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> +function [a, b] = circulant_eig (v) -function [a, b] = circulant_eig(v) + warning ("off", "Octave:broadcast"); #the code below uses broadcasting + #find the eigenvalues + n = numel(v); + lambda = ones(n, 1); + s = (0:(n-1)); + lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; -warning ("off", "Octave:broadcast"); #the code below uses broadcasting + if nargout < 2 + a = lambda; + return + endif -#find the eigenvalues -n = numel(v); -lambda = ones(n, 1); -s = (0:(n-1)); -lambda = sum(v .* exp(-2*pi*i*s'*s/n))'; + #find the eigenvectors (which in fact do not depend on v) + a = exp(-2*i*pi*s'*s/n) / sqrt(n); + b = diag(lambda); -if nargout < 2 - a = lambda; - return -endif - -#find the eigenvectors (which in fact do not depend on v) -a = exp(-2*i*pi*s'*s/n) / sqrt(n); -b = diag(lambda); - - endfunction - %!shared v,C,vs,lambda %! v = [1 2 3]'; %! C = circulant_make_matrix(v); Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_inv.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,20 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## 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 Foundation; either version 2 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{c}] =} circulant_inv (@var{v}) +## @deftypefn{Function File} {@var{c} =} circulant_inv (@var{v}) ## ## Fast, compact calculation of inverse of a circulant matrix@* ## Given an @var{n}*1 vector @var{v}, return the inverse @var{c} of the @var{n}*@var{n} circulant matrix @var{C} that has @var{v} as its first column @@ -26,24 +26,19 @@ ## ## Reference: Robert M. Gray, Toeplitz and Circulant Matrices: A Review, Now Publishers, http://ee.stanford.edu/~gray/toeplitz.pdf, Chapter 3 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_matrix_vector_product, circulant_eig} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> - function c = circulant_inv(v) + ## Find the eigenvalues and eigenvectors + [vs, lambda] = circulant_eig(v); -## Find the eigenvalues and eigenvectors -[vs, lambda] = circulant_eig(v); + ## Find the first column of the inverse + c = vs * diag(1 ./ diag(lambda)) * conj(vs(:, 1)); -## Find the first column of the inverse -c = vs * diag(1 ./ diag(lambda)) * conj(vs(:, 1)); - - endfunction - %!shared v %! v = [1 2 3]'; %!assert (make_circulant_matrix(circulant_inv(v)), inv(make_circulant_matrix(v)), 10*eps); Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_make_matrix.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,20 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## 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 Foundation; either version 2 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{C}] =} circulant_make_matrix(@var{v}) +## @deftypefn{Function File} {@var{C} =} circulant_make_matrix (@var{v}) ## ## Produce a full circulant matrix given the first column@* ## Given an @var{n}*1 vector @var{v}, returns the @var{n}*@var{n} circulant matrix @var{C} where @var{v} is the left column and all other columns are downshifted versions of @var{v} @@ -23,22 +23,17 @@ ## ## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 ## -## @end deftypefn ## @seealso{circulant_matrix_vector_product, circulant_eig, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> - - function C = circulant_make_matrix(v) -n = numel(v); + n = numel(v); + C = ones(n, n); + for i = 1:n + C(:, i) = v([(end-i+2):end 1:(end-i+1)]); #or circshift(v, i-1) + endfor -C = ones(n, n); - -for i = 1:n - C(:, i) = v([(end-i+2):end 1:(end-i+1)]); #or circshift(v, i-1) -endfor - endfunction %!shared v,C Modified: trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/circulant_matrix_vector_product.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,48 +1,42 @@ -## Copyright (C) 2012 Nir Krakauer +## Copyright (C) 2012 Nir Krakauer <nkr...@cc...> ## -## 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 Foundation; either version 2 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File}{[@var{y}] =} circulant_matrix_vector_product(@var{v}, @var{x}) +## @deftypefn{Function File} {@var{y} =} circulant_matrix_vector_product (@var{v}, @var{x}) ## ## Fast, compact calculation of the product of a circulant matrix with a vector@* ## Given @var{n}*1 vectors @var{v} and @var{x}, return the matrix-vector product @var{y} = @var{C}@var{x}, where @var{C} is the @var{n}*@var{n} circulant matrix that has @var{v} as its first column ## ## Theoretically the same as @code{make_circulant_matrix(x) * v}, but does not form @var{C} explicitly; uses the discrete Fourier transform ## -## Because of roundoff, the returned @var{y} may have a small imaginary component even if @var{v} and @var{x} are real (use @code{real(y)} to remedy this) +## Because of roundoff, the returned @var{y} may have a small imaginary component even if @var{v} and @var{x} are real (use @code{real(y)} to remedy this) ## ## Reference: Gene H. Golub and Charles F. Van Loan, Matrix Computations, 3rd Ed., Section 4.7.7 ## -## @end deftypefn ## @seealso{circulant_make_matrix, circulant_eig, circulant_inv} +## @end deftypefn -## Author: Nir Krakauer <nkr...@cc...> +function y = circulant_matrix_vector_product (v, x) -function y = circulant_matrix_vector_product(v, x) + xf = fft(x); + vf = fft(v); + z = vf .* xf; + y = ifft(z); - -xf = fft(x); -vf = fft(v); -z = vf .* xf; -y = ifft(z); - - endfunction - - %!shared v,x %! v = [1 2 3]'; x = [2 5 6]'; %!assert (circulant_matrix_vector_product(v, x), circulant_make_matrix(v)*x, eps); Modified: trunk/octave-forge/main/linear-algebra/inst/cod.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/cod.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/cod.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2009 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## 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 Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {[@var{q}, @var{r}, @var{z}] =} cod (@var{a}) @@ -36,11 +33,13 @@ ## If a second argument of '0' is given, an economy-sized factorization is returned ## so that @var{r} is K-by-K. ## -## NOTE: This is currently implemented by double QR factorization plus some +## @emph{NOTE}: This is currently implemented by double QR factorization plus some ## tricky manipulations, and is not as efficient as using xRZTZF from LAPACK. ## @seealso{qr} ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function [q, r, z, p] = cod (a, varargin) if (nargin < 1 || nargin > 2 || nargout > 4 || ! ismatrix (a)) Modified: trunk/octave-forge/main/linear-algebra/inst/condeig.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/condeig.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/condeig.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,17 +1,17 @@ ## Copyright (C) 2006, 2007 Arno Onken <as...@as...> ## -## 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 Foundation, either version 3 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program. If not, see <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{c} =} condeig (@var{a}) Modified: trunk/octave-forge/main/linear-algebra/inst/funm.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/funm.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/funm.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,19 +1,18 @@ ## Copyright (C) 2000, 2011 P.R. Nienhuis <prn...@us...> ## Copyright (C) 2001 Paul Kienzle <pki...@us...> ## -## 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 Foundation; either version 2 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {@var{B} =} funm (@var{A}, @var{F}) @@ -49,17 +48,6 @@ ## @seealso{thfm, expm, logm, sqrtm} ## @end deftypefn -## Author: P.R. Nienhuis <prn...@us...> (somewhere in 2000) -## Additions by P. Kienzle, ......... -## 2001-03-01 Paul Kienzle -## * Many code improvements -## 2011-03-27 Philip Nienhuis -## * Function handles -## * Texinfo header -## * Fallback to thfm for trig & hyperb funcs to avoid diagonalization -## 2011-07-29 Philip Nienhuis -## * Layout, cleanup (tabs, alignment, ...) - function B = funm (A, name) persistent thfuncs = {"cos", "sin", "tan", "sec", "csc", "cot", ... Modified: trunk/octave-forge/main/linear-algebra/inst/lobpcg.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/lobpcg.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/lobpcg.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,18 +1,17 @@ ## Copyright (C) 2000-2011 A.V. Knyazev <And...@uc...> ## -## This library is free software; you can redistribute it and/or -## modify it under the terms of the GNU Lesser General Public -## License as published by the Free Software Foundation; either -## version 2.1 of the License, or (at your option) any later version. +## This program is free software; you can redistribute it and/or modify it under +## the terms of the GNU Lesser General Public License as published by the Free +## Software Foundation; either version 3 of the License, or (at your option) any +## later version. ## -## This library is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -## Lesser General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +## for more details. ## -## You should have received a copy of the GNU Lesser General Public -## License along with this library; if not, write to the Free Software -## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +## You should have received a copy of the GNU Lesser General Public License +## along with this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn {Function File} {[@var{blockVectorX}, @var{lambda}] =} lobpcg (@var{blockVectorX}, @var{operatorA}) @@ -251,11 +250,6 @@ ## package and is directly available, e.g., in PETSc and HYPRE. ## @end deftypefn -% License: GNU LGPL ver 2.1 or above -% Copyright (c) 2000-2011 A.V. Knyazev, And...@uc... -% $Revision: 4.13 $ $Date: 16-Oct-2011 -% Tested in MATLAB 6.5-7.13 and Octave 3.2.3-3.4.2. - function [blockVectorX,lambda,varargout] = lobpcg(blockVectorX,operatorA,varargin) %Begin Modified: trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/ndcovlt.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2010 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## 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 Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{y} =} ndcovlt (@var{x}, @var{t1}, @var{t2}, @dots{}) @@ -44,6 +41,8 @@ ## ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function y = ndcovlt (x, varargin) nd = max (ndims (x), nargin - 1); varargin = resize (varargin, 1, nd); Modified: trunk/octave-forge/main/linear-algebra/inst/rotparams.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/rotparams.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,25 +1,24 @@ ## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## -## 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 Foundation; either version 2, or (at your option) any -## later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This is distributed in the hope that it will be useful, but WITHOUT +## This program is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn{Function File} {@var{[vstacked, astacked]} = } rotparams ( rstacked ) +## @deftypefn{Function File} {[@var{vstacked}, @var{astacked}] =} rotparams (@var{rstacked}) ## @cindex ## The function w = rotparams (r) - Inverse to rotv(). ## Using, @var{w} = rotparams(@var{r}) is such that -## rotv(w)*r' == eye(3). +## rotv(w)*r' == eye(3). ## ## If used as, [v,a]=rotparams(r) , idem, with v (1 x 3) s.t. w == a*v. ## Modified: trunk/octave-forge/main/linear-algebra/inst/rotv.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/rotv.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,18 +1,17 @@ ## Copyright (C) 2002 Etienne Grossmann <et...@eg...> ## -## 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 Foundation; either version 2, or (at your option) any -## later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This is distributed in the hope that it will be useful, but WITHOUT +## This program is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -## for more details. +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{r} = } rotv ( v, ang ) Modified: trunk/octave-forge/main/linear-algebra/inst/smwsolve.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/smwsolve.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/smwsolve.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,20 +1,17 @@ ## Copyright (C) 2009 VZLU Prague, a.s., Czech Republic ## -## Author: Jaroslav Hajek <hi...@gm...> -## -## 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 Foundation; either version 3 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. +## +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. +## +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{x} =} smwsolve (@var{a}, @var{u}, @var{v}, @var{b}) @@ -29,6 +26,8 @@ ## @var{solver} that performs the left division operation. ## @end deftypefn +## Author: Jaroslav Hajek <hi...@gm...> + function x = smwsolve (a, u, v, b) if (nargin != 4) Modified: trunk/octave-forge/main/linear-algebra/inst/thfm.m =================================================================== --- trunk/octave-forge/main/linear-algebra/inst/thfm.m 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/inst/thfm.m 2012-04-19 10:01:50 UTC (rev 10294) @@ -3,19 +3,18 @@ ## Copyright (C) 2011 Philip Nienhuis <pr....@hc...> ## Copyright (C) 2011 Carnë Draug <car...@gm...> ## -## 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 Foundation; either version 3 of the License, or -## (at your option) any later version. +## 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 +## Foundation; either version 3 of the License, or (at your option) any later +## version. ## -## This program is distributed in the hope that it will be useful, but -## WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. +## This program is distributed in the hope that it will be useful, but WITHOUT +## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +## details. ## -## You should have received a copy of the GNU General Public License -## along with Octave; see the file COPYING. If not, see -## <http://www.gnu.org/licenses/>. +## You should have received a copy of the GNU General Public License along with +## this program; if not, see <http://www.gnu.org/licenses/>. ## -*- texinfo -*- ## @deftypefn{Function File} {@var{y} =} thfm (@var{x}, @var{mode}) Modified: trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,23 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis -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 Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -290,9 +286,3 @@ } return info; } - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h =================================================================== --- trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/CmplxGSVD.h 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis - -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 Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #if !defined (octave_ComplexGSVD_h) #define octave_ComplexGSVD_h 1 @@ -95,9 +90,3 @@ }; #endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/dbleGSVD.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,23 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis -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 Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -296,9 +292,3 @@ return os; } - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h =================================================================== --- trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/dbleGSVD.h 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006 Pascal Dupuis <Pas...@uc...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006 Pascal Dupuis - -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 Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #if !defined (octave_GSVD_h) #define octave_GSVD_h 1 @@ -94,9 +89,3 @@ }; #endif - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/gsvd.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/gsvd.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/gsvd.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,19 @@ -/* +// Copyright (C) 1996, 1997 John W. Eaton +// Copyright (C) 2006, 2010 Pascal Dupuis <Pas...@uc...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. -Copyright (C) 1996, 1997 John W. Eaton -Copyright (C) 2006, 2010 Pascal Dupuis <Pas...@uc...> - -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 Foundation; either version 2, or (at your option) any -later version. - -This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with this software; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -488,9 +483,3 @@ %!assert(norm((V'*B*X)-D2*[zeros(4, 1) R]) <= 1e-6) */ - -/* -;;; Local Variables: *** -;;; mode: C++ *** -;;; End: *** -*/ Modified: trunk/octave-forge/main/linear-algebra/src/pgmres.cc =================================================================== --- trunk/octave-forge/main/linear-algebra/src/pgmres.cc 2012-04-19 09:44:33 UTC (rev 10293) +++ trunk/octave-forge/main/linear-algebra/src/pgmres.cc 2012-04-19 10:01:50 UTC (rev 10294) @@ -1,24 +1,17 @@ -/* - Copyright (C) 2009 Carlo de Falco - - 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 Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - Author: Carlo de Falco <cdf _AT_ users _DOT_ sourceforge _DOT_ net> - Created: 2009-06-01 - -*/ +// Copyright (C) 2009 Carlo de Falco <cd...@us...> +// +// 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 +// Foundation; either version 3 of the License, or (at your option) any later +// version. +// +// This program is distributed in the hope that it will be useful, but WITHOUT +// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// this program; if not, see <http://www.gnu.org/licenses/>. #include <octave/oct.h> #include <octave/parse.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |