Mercurial > forge
changeset 9843:4138881fd6c3 octave-forge
ga: style fix
author | slackydeb |
---|---|
date | Sat, 24 Mar 2012 16:33:14 +0000 |
parents | 2ceac224d860 |
children | 94a15827f127 |
files | main/ga/inst/ga.m |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/main/ga/inst/ga.m Sat Mar 24 16:33:02 2012 +0000 +++ b/main/ga/inst/ga.m Sat Mar 24 16:33:14 2012 +0000 @@ -133,6 +133,7 @@ # TODO # TODO: test that each field in the user-specified "problem" structure is checked + ## flawless execution with right arguments %!shared f, nvars %! f = @rastriginsfcn; @@ -264,6 +265,7 @@ %! options = gaoptimset ("Vectorized", "on"); %! x = ga (f, nvars, [], [], [], [], [], [], @nonlcon, options); + ## error with conflicting optimization parameters: population size et al. %!shared f, nvars %! f = @rastriginsfcn; @@ -335,6 +337,7 @@ %! "Vectorized", "garbage"); %! x = ga (f, nvars, [], [], [], [], [], [], @nonlcon, bad_options); + # TODO: structure/add tests below %!test x = ga (struct ("fitnessfcn", @(x) rastriginsfcn (x(1:2)) + ((x(3) ** 2) - (cos (2 * pi * x(3))) + 1) + (x(4) ** 2), "nvars", 4, "options", gaoptimset ()));