comparison main/optim/inst/cg_min.m @ 9930:d30cfca46e8a octave-forge

optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
author carandraug
date Fri, 30 Mar 2012 15:14:48 +0000
parents a5fa14594ca4
children f82660cf7dee
comparison
equal deleted inserted replaced
9929:df50d0ae107f 9930:d30cfca46e8a
1 ## Copyright (C) 2002 Etienne Grossmann <etienne@isr.ist.utl.pt>
2 ## Copyright (C) 2009 Levente Torok <TorokLev@gmail.com>
3 ##
4 ## This program is free software; you can redistribute it and/or modify it under
5 ## the terms of the GNU General Public License as published by the Free Software
6 ## Foundation; either version 3 of the License, or (at your option) any later
7 ## version.
8 ##
9 ## This program is distributed in the hope that it will be useful, but WITHOUT
10 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 ## details.
13 ##
14 ## You should have received a copy of the GNU General Public License along with
15 ## this program; if not, see <http://www.gnu.org/licenses/>.
16
1 ## -*- texinfo -*- 17 ## -*- texinfo -*-
2 ## @deftypefn {Function File} {[@var{x0},@var{v},@var{nev}]} cg_min ( @var{f},@var{df},@var{args},@var{ctl} ) 18 ## @deftypefn {Function File} {[@var{x0},@var{v},@var{nev}]} cg_min ( @var{f},@var{df},@var{args},@var{ctl} )
3 ## NonLinear Conjugate Gradient method to minimize function @var{f}. 19 ## NonLinear Conjugate Gradient method to minimize function @var{f}.
4 ## 20 ##
5 ## @subheading Arguments 21 ## @subheading Arguments
52 ## 68 ##
53 ## Comment: In general, BFGS method seems to be better performin in many cases but requires more computation per iteration 69 ## Comment: In general, BFGS method seems to be better performin in many cases but requires more computation per iteration
54 ## @seealso{ bfgsmin, http://en.wikipedia.org/wiki/Nonlinear_conjugate_gradient } 70 ## @seealso{ bfgsmin, http://en.wikipedia.org/wiki/Nonlinear_conjugate_gradient }
55 ## @end deftypefn 71 ## @end deftypefn
56 72
57 ## Author : Etienne Grossmann <etienne@isr.ist.utl.pt>
58 ## Modified by: Levente Torok <TorokLev@gmail.com>
59 ## This software is distributed under the terms of the GPL
60
61 function [x,v,nev] = cg_min (f, dfn, args, ctl) 73 function [x,v,nev] = cg_min (f, dfn, args, ctl)
62 74
63 verbose = 0; 75 verbose = 0;
64 76
65 crit = 1; # Default control variables 77 crit = 1; # Default control variables