From 81ada88de21fa5ea9a1a09e92f00e9b835058385 Mon Sep 17 00:00:00 2001 From: sebastien Date: Fri, 26 Sep 2008 16:55:26 +0000 Subject: [PATCH] trunk: fixed copyright header of generalized_cholesky?.m files git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2119 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/generalized_cholesky.m | 27 +++++++++++++---- matlab/generalized_cholesky2.m | 55 ++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 28 deletions(-) diff --git a/matlab/generalized_cholesky.m b/matlab/generalized_cholesky.m index 9449e5f00..2252b7210 100644 --- a/matlab/generalized_cholesky.m +++ b/matlab/generalized_cholesky.m @@ -1,10 +1,25 @@ -% proc gmchol(A); -% /* calculates the Gill-Murray generalized choleski decomposition */ -% /* input matrix A must be non-singular and symmetric */ -% /* Author: Jeff Gill. Part of the Hessian Project. */ -% local i,j,k,n,sum,R,theta_j,norm_A,phi_j,delta,xi_j,gamm,E,beta_j; - function AA = generalized_cholesky(A); +%function AA = generalized_cholesky(A); +% +% Calculates the Gill-Murray generalized choleski decomposition +% Input matrix A must be non-singular and symmetric + +% Copyright (C) 2003 Dynare Team +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see . n = rows(A); R = eye(n); diff --git a/matlab/generalized_cholesky2.m b/matlab/generalized_cholesky2.m index c60dd456e..4c81f2899 100644 --- a/matlab/generalized_cholesky2.m +++ b/matlab/generalized_cholesky2.m @@ -1,26 +1,37 @@ -% /* -% ** By Jeff Gill, April 2002. -% ** -% ** This procedure produces: -% ** -% ** y = chol(A+E), where E is a diagonal matrix with each element as small -% ** as possible, and A and E are the same size. E diagonal values are -% ** constrained by iteravely updated Gerschgorin bounds. -% ** -% ** REFERENCES: -% ** -% ** Jeff Gill and Gary King. 1998. "`Hessian not Invertable.' Help!" -% ** manuscript in progress, Harvard University. -% ** -% ** Robert B. Schnabel and Elizabeth Eskow. 1990. "A New Modified Cholesky -% ** Factorization," SIAM Journal of Scientific Statistical Computating, -% ** 11, 6: 1136-58. -% ** -% ** -% ** -% ** Stéphane Adjemian (2003): translation from Gauss to Matlab. -% */ function AA = generalized_cholesky2(A) +%function AA = generalized_cholesky2(A) +% +% This procedure produces: +% +% y = chol(A+E), where E is a diagonal matrix with each element as small +% as possible, and A and E are the same size. E diagonal values are +% constrained by iteravely updated Gerschgorin bounds. +% +% REFERENCES: +% +% Jeff Gill and Gary King. 1998. "`Hessian not Invertable.' Help!" +% manuscript in progress, Harvard University. +% +% Robert B. Schnabel and Elizabeth Eskow. 1990. "A New Modified Cholesky +% Factorization," SIAM Journal of Scientific Statistical Computating, +% 11, 6: 1136-58. + +% Copyright (C) 2003 Dynare Team +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see . n = size(A,1); L = zeros(n,n);