From: stevenj Date: Tue, 29 Jul 2008 06:26:33 +0000 (-0400) Subject: updated .m files X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=9173108b07c3f09abad9901076a976dbc7ce3b19;p=nlopt.git updated .m files darcs-hash:20080729062633-c8de0-8bdb86888d51da1a4e2bb26bd4319784a9100b4b.gz --- diff --git a/octave/Makefile.am b/octave/Makefile.am index 18265d1..0de0af2 100644 --- a/octave/Makefile.am +++ b/octave/Makefile.am @@ -1,6 +1,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/api -MFILES = NLOPT_GN_DIRECT.m NLOPT_GN_DIRECT_L.m NLOPT_GN_DIRECT_L_RAND.m NLOPT_GN_DIRECT_NOSCAL.m NLOPT_GN_DIRECT_L_NOSCAL.m NLOPT_GN_DIRECT_L_RAND_NOSCAL.m NLOPT_GN_ORIG_DIRECT.m NLOPT_GN_ORIG_DIRECT_L.m NLOPT_LN_SUBPLEX.m NLOPT_GD_STOGO.m NLOPT_GD_STOGO_RAND.m NLOPT_LD_LBFGS.m NLOPT_LN_PRAXIS.m NLOPT_LD_VAR1.m NLOPT_LD_VAR2.m NLOPT_LD_TNEWTON.m NLOPT_LD_TNEWTON_RESTART.m NLOPT_LD_TNEWTON_PRECOND.m NLOPT_LD_TNEWTON_PRECOND_RESTART.m NLOPT_GN_CRS2_LM.m NLOPT_GN_MLSL.m NLOPT_GD_MLSL.m NLOPT_GN_MLSL_LDS.m NLOPT_GD_MLSL_LDS.m +MFILES = NLOPT_GN_DIRECT.m NLOPT_GN_DIRECT_L.m NLOPT_GN_DIRECT_L_RAND.m NLOPT_GN_DIRECT_NOSCAL.m NLOPT_GN_DIRECT_L_NOSCAL.m NLOPT_GN_DIRECT_L_RAND_NOSCAL.m NLOPT_GN_ORIG_DIRECT.m NLOPT_GN_ORIG_DIRECT_L.m NLOPT_LN_SUBPLEX.m NLOPT_GD_STOGO.m NLOPT_GD_STOGO_RAND.m NLOPT_LD_LBFGS_NOCEDAL.m NLOPT_LD_LBFGS.m NLOPT_LN_PRAXIS.m NLOPT_LD_VAR1.m NLOPT_LD_VAR2.m NLOPT_LD_TNEWTON.m NLOPT_LD_TNEWTON_RESTART.m NLOPT_LD_TNEWTON_PRECOND.m NLOPT_LD_TNEWTON_PRECOND_RESTART.m NLOPT_GN_CRS2_LM.m NLOPT_GN_MLSL.m NLOPT_GD_MLSL.m NLOPT_GN_MLSL_LDS.m NLOPT_GD_MLSL_LDS.m NLOPT_LD_MMA.m ####################################################################### octdir = $(OCT_INSTALL_DIR) diff --git a/octave/NLOPT_GD_MLSL.m b/octave/NLOPT_GD_MLSL.m index 9cc25ea..59ec35d 100644 --- a/octave/NLOPT_GD_MLSL.m +++ b/octave/NLOPT_GD_MLSL.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_GD_MLSL - val = 21; + val = 22; diff --git a/octave/NLOPT_GD_MLSL_LDS.m b/octave/NLOPT_GD_MLSL_LDS.m index 73c1ef1..ffb6233 100644 --- a/octave/NLOPT_GD_MLSL_LDS.m +++ b/octave/NLOPT_GD_MLSL_LDS.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_GD_MLSL_LDS - val = 23; + val = 24; diff --git a/octave/NLOPT_GD_STOGO.m b/octave/NLOPT_GD_STOGO.m index 67575c0..e648885 100644 --- a/octave/NLOPT_GD_STOGO.m +++ b/octave/NLOPT_GD_STOGO.m @@ -1,4 +1,4 @@ -% NLOPT_GD_STOGO: StoGO (global, derivative-based) +% NLOPT_GD_STOGO: StoGO (NOT COMPILED) % % See nlopt_minimize for more information. function val = NLOPT_GD_STOGO diff --git a/octave/NLOPT_GD_STOGO_RAND.m b/octave/NLOPT_GD_STOGO_RAND.m index decd945..c9546c9 100644 --- a/octave/NLOPT_GD_STOGO_RAND.m +++ b/octave/NLOPT_GD_STOGO_RAND.m @@ -1,4 +1,4 @@ -% NLOPT_GD_STOGO_RAND: StoGO with randomized search (global, derivative-based) +% NLOPT_GD_STOGO_RAND: StoGO randomized (NOT COMPILED) % % See nlopt_minimize for more information. function val = NLOPT_GD_STOGO_RAND diff --git a/octave/NLOPT_GN_CRS2_LM.m b/octave/NLOPT_GN_CRS2_LM.m index bde02d1..5475151 100644 --- a/octave/NLOPT_GN_CRS2_LM.m +++ b/octave/NLOPT_GN_CRS2_LM.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_GN_CRS2_LM - val = 19; + val = 20; diff --git a/octave/NLOPT_GN_MLSL.m b/octave/NLOPT_GN_MLSL.m index 4642de0..d1fb6b6 100644 --- a/octave/NLOPT_GN_MLSL.m +++ b/octave/NLOPT_GN_MLSL.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_GN_MLSL - val = 20; + val = 21; diff --git a/octave/NLOPT_GN_MLSL_LDS.m b/octave/NLOPT_GN_MLSL_LDS.m index bdde5ba..567d286 100644 --- a/octave/NLOPT_GN_MLSL_LDS.m +++ b/octave/NLOPT_GN_MLSL_LDS.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_GN_MLSL_LDS - val = 22; + val = 23; diff --git a/octave/NLOPT_LD_LBFGS.m b/octave/NLOPT_LD_LBFGS.m index 47e125f..7a81af3 100644 --- a/octave/NLOPT_LD_LBFGS.m +++ b/octave/NLOPT_LD_LBFGS.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_LBFGS - val = 11; + val = 12; diff --git a/octave/NLOPT_LD_TNEWTON.m b/octave/NLOPT_LD_TNEWTON.m index 60fb2d7..554b269 100644 --- a/octave/NLOPT_LD_TNEWTON.m +++ b/octave/NLOPT_LD_TNEWTON.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_TNEWTON - val = 15; + val = 16; diff --git a/octave/NLOPT_LD_TNEWTON_PRECOND.m b/octave/NLOPT_LD_TNEWTON_PRECOND.m index ab42479..1a3ed4d 100644 --- a/octave/NLOPT_LD_TNEWTON_PRECOND.m +++ b/octave/NLOPT_LD_TNEWTON_PRECOND.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_TNEWTON_PRECOND - val = 17; + val = 18; diff --git a/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m b/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m index d1e42f7..b89ac1b 100644 --- a/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m +++ b/octave/NLOPT_LD_TNEWTON_PRECOND_RESTART.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_TNEWTON_PRECOND_RESTART - val = 18; + val = 19; diff --git a/octave/NLOPT_LD_TNEWTON_RESTART.m b/octave/NLOPT_LD_TNEWTON_RESTART.m index 7ef9d75..059b140 100644 --- a/octave/NLOPT_LD_TNEWTON_RESTART.m +++ b/octave/NLOPT_LD_TNEWTON_RESTART.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_TNEWTON_RESTART - val = 16; + val = 17; diff --git a/octave/NLOPT_LD_VAR1.m b/octave/NLOPT_LD_VAR1.m index 0385562..04ffbcb 100644 --- a/octave/NLOPT_LD_VAR1.m +++ b/octave/NLOPT_LD_VAR1.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_VAR1 - val = 13; + val = 14; diff --git a/octave/NLOPT_LD_VAR2.m b/octave/NLOPT_LD_VAR2.m index fd9c229..f85ad62 100644 --- a/octave/NLOPT_LD_VAR2.m +++ b/octave/NLOPT_LD_VAR2.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LD_VAR2 - val = 14; + val = 15; diff --git a/octave/NLOPT_LN_PRAXIS.m b/octave/NLOPT_LN_PRAXIS.m index c768cae..ba3cf6a 100644 --- a/octave/NLOPT_LN_PRAXIS.m +++ b/octave/NLOPT_LN_PRAXIS.m @@ -2,4 +2,4 @@ % % See nlopt_minimize for more information. function val = NLOPT_LN_PRAXIS - val = 12; + val = 13; diff --git a/octave/mkconstants.sh b/octave/mkconstants.sh index 83876b1..47aef44 100755 --- a/octave/mkconstants.sh +++ b/octave/mkconstants.sh @@ -3,14 +3,15 @@ names=`egrep NLOPT_[LG][ND] ../api/nlopt.h |sed 's/ //g' |tr = , |cut -d, -f1` i=0 -desc_start=`grep -n nlopt_algorithm_names ../api/nlopt.c |cut -d: -f1 |head -1` +gcc -E ../api/nlopt.c | perl -pe 's/^ *\n//' > foo.c +desc_start=`grep -n nlopt_algorithm_names foo.c |cut -d: -f1 |head -1` for n in $names; do # if test -r $n.m; then # perl -pi -e "s/val = [0-9]+;/val = $i;/" $n.m # else descline=`expr $i + $desc_start + 1` - desc=`tail -n +$descline ../api/nlopt.c |head -1 |cut -d\" -f2` + desc=`tail -n +$descline foo.c |head -1 |cut -d\" -f2` cat > $n.m <