Particle swarm optimization: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: adjusted the alignment of the output columns.) |
m (→{{header|REXX}}: elided a testing setting.) |
||
Line 1,539: | Line 1,539: | ||
<lang rexx>/*REXX program calculates Particle Swarm Optimization as it migrates through a solution.*/ |
<lang rexx>/*REXX program calculates Particle Swarm Optimization as it migrates through a solution.*/ |
||
numeric digits length( pi() ) - 1 /*use the number of decimal digs in pi.*/ |
numeric digits length( pi() ) - 1 /*use the number of decimal digs in pi.*/ |
||
numeric digits 44 |
|||
parse arg x y d #part sDigs . /*obtain optional arguments from the CL*/ |
parse arg x y d #part sDigs . /*obtain optional arguments from the CL*/ |
||
if x=='' | x=="," then x= -0.5 /*Not specified? Then use the default.*/ |
if x=='' | x=="," then x= -0.5 /*Not specified? Then use the default.*/ |