comparison main/optim/src/__bfgsmin.cc @ 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 c76dd0b09f9e
children 07a36f1d7316
comparison
equal deleted inserted replaced
9929:df50d0ae107f 9930:d30cfca46e8a
1 // Copyright (C) 2004,2005,2006,2007,2010 Michael Creel <michael.creel@uab.es> 1 // Copyright (C) 2004,2005,2006,2007,2010 Michael Creel <michael.creel@uab.es>
2 // 2 //
3 // This program is free software; you can redistribute it and/or modify 3 // This program is free software; you can redistribute it and/or modify it under
4 // it under the terms of the GNU General Public License as published by 4 // the terms of the GNU General Public License as published by the Free Software
5 // the Free Software Foundation; either version 2 of the License, or 5 // Foundation; either version 3 of the License, or (at your option) any later
6 // (at your option) any later version. 6 // version.
7 // 7 //
8 // This program is distributed in the hope that it will be useful, 8 // This program is distributed in the hope that it will be useful, but WITHOUT
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 9 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11 // GNU General Public License for more details. 11 // details.
12 // 12 //
13 // You should have received a copy of the GNU General Public License 13 // You should have received a copy of the GNU General Public License along with
14 // along with this program; if not, write to the Free Software 14 // this program; if not, see <http://www.gnu.org/licenses/>.
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 15
17 // the functions defined in this file are: 16 // the functions defined in this file are:
18 // __bfgsmin_obj: bulletproofed objective function that allows checking for availability of analytic gradient 17 // __bfgsmin_obj: bulletproofed objective function that allows checking for availability of analytic gradient
19 // __numgradient: numeric gradient, used only if analytic not supplied 18 // __numgradient: numeric gradient, used only if analytic not supplied
20 // __bisectionstep: fallback stepsize algorithm 19 // __bisectionstep: fallback stepsize algorithm
21 // __newtonstep: default stepsize algorithm 20 // __newtonstep: default stepsize algorithm
22 // __bfgsmin: the DLD function that does the minimization, to be called from bfgsmin.m 21 // __bfgsmin: the DLD function that does the minimization, to be called from bfgsmin.m
23 22
24
25
26 #include <oct.h> 23 #include <oct.h>
27 #include <octave/parse.h> 24 #include <octave/parse.h>
28 #include <octave/Cell.h> 25 #include <octave/Cell.h>
29 #include <octave/lo-mappers.h> 26 #include <octave/lo-mappers.h>
30 #include <float.h> 27 #include <float.h>
31 #include "error.h" 28 #include "error.h"
32
33 29
34 int __bfgsmin_obj(double &obj, const std::string f, const octave_value_list f_args, const ColumnVector theta, const int minarg) 30 int __bfgsmin_obj(double &obj, const std::string f, const octave_value_list f_args, const ColumnVector theta, const int minarg)
35 { 31 {
36 octave_value_list f_return, f_args_new; 32 octave_value_list f_return, f_args_new;
37 int success = 1; 33 int success = 1;