From: <sla...@us...> - 2012-03-19 00:34:31
|
Revision: 9959 http://octave.svn.sourceforge.net/octave/?rev=9959&view=rev Author: slackydeb Date: 2012-03-19 00:34:25 +0000 (Mon, 19 Mar 2012) Log Message: ----------- ga: polish code Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m trunk/octave-forge/main/ga/inst/rastriginsfcn.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:34:11 UTC (rev 9958) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-19 00:34:25 UTC (rev 9959) @@ -115,7 +115,7 @@ endfunction -## number of arguments +## number of input arguments %!shared f, nvars %! f = @rastriginsfcn; %! nvars = 2; @@ -125,8 +125,10 @@ %!error x = ga (f, nvars, [], [], []) %!error x = ga (f, nvars, [], [], [], [], []) %!error x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset (), []) -# TODO: test number of output arguments +## number of output arguments +# TODO + ## type of arguments # TODO # TODO: test that each field in the user-specified "problem" structure is checked Modified: trunk/octave-forge/main/ga/inst/rastriginsfcn.m =================================================================== --- trunk/octave-forge/main/ga/inst/rastriginsfcn.m 2012-03-19 00:34:11 UTC (rev 9958) +++ trunk/octave-forge/main/ga/inst/rastriginsfcn.m 2012-03-19 00:34:25 UTC (rev 9959) @@ -34,9 +34,11 @@ endfunction -## number of arguments +## number of input arguments %!error y = rastriginsfcn () %!error y = rastriginsfcn ([0, 0], "other argument") + +## number of output arguments %!error [y1, y2] = rastriginsfcn ([0, 0]) ## type of arguments This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |