From: <sla...@us...> - 2009-05-11 23:25:46
|
Revision: 5805 http://octave.svn.sourceforge.net/octave/?rev=5805&view=rev Author: slackydeb Date: 2009-05-11 23:25:32 +0000 (Mon, 11 May 2009) Log Message: ----------- Improve doc/examples from user feedback. Bump version. Modified Paths: -------------- trunk/octave-forge/main/ga/DESCRIPTION trunk/octave-forge/main/ga/doc/README Added Paths: ----------- trunk/octave-forge/main/ga/doc/EXAMPLES Modified: trunk/octave-forge/main/ga/DESCRIPTION =================================================================== --- trunk/octave-forge/main/ga/DESCRIPTION 2009-05-11 13:31:54 UTC (rev 5804) +++ trunk/octave-forge/main/ga/DESCRIPTION 2009-05-11 23:25:32 UTC (rev 5805) @@ -1,6 +1,6 @@ Name: ga -Version: 0.9.6 -Date: 2009-04-09 +Version: 0.9.7 +Date: 2009-05-12 Author: Luca Favatella <sla...@gm...> Maintainer: Luca Favatella <sla...@gm...> Title: Genetic Algorithm and Direct Search Added: trunk/octave-forge/main/ga/doc/EXAMPLES =================================================================== --- trunk/octave-forge/main/ga/doc/EXAMPLES (rev 0) +++ trunk/octave-forge/main/ga/doc/EXAMPLES 2009-05-11 23:25:32 UTC (rev 5805) @@ -0,0 +1,35 @@ +All examples in this file should be copied from ga.m. + +If you add in this file an example not coming from ga.m, please mark +it as "NOT COPIED FROM ga.m". + + + +######## + +min = [-1, 2]; +ga (struct ("fitnessfcn", @(x) rastriginsfcn (x - min), "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000, "PopInitRange", [-5; 5], "PopulationSize", 200))) + +######## + +ga (@(x) x ** 2, 1) + +######## + +ga (@(x) (x ** 2) - (cos (2 * pi * x)) + 1, 1) + +######## + +ga (@rastriginsfcn, 2) + +######## + +ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "Generations", 1000))) + +######## + +ga (struct ("fitnessfcn", @rastriginsfcn, "nvars", 2, "options", gaoptimset ("FitnessLimit", 1e-7, "PopulationSize", 200))) + +######## + +ga (struct ("fitnessfcn", @(x) rastriginsfcn (x(1:2)) + ((x(3) ** 2) - (cos (2 * pi * x(3))) + 1) + (x(4) ** 2), "nvars", 4, "options", gaoptimset ("EliteCount", 5, "FitnessLimit", 1e-7, "PopInitRange", [-2; 2], "PopulationSize", 200))) \ No newline at end of file Modified: trunk/octave-forge/main/ga/doc/README =================================================================== --- trunk/octave-forge/main/ga/doc/README 2009-05-11 13:31:54 UTC (rev 5804) +++ trunk/octave-forge/main/ga/doc/README 2009-05-11 23:25:32 UTC (rev 5805) @@ -1,6 +1,6 @@ STATUS (BY EXAMPLES) -see tests of the ga function +See tests of the ga function or the EXAMPLES file. TODO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |