Particle swarm optimization: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added/changed whitespace and comments, simplified a function, added a better (computation) cessation algorithm.) |
|||
Line 116: | Line 116: | ||
GlobalBestValue: _1.8013</lang> |
GlobalBestValue: _1.8013</lang> |
||
=={{header| |
=={{header|JavaScript}}== |
||
Translation of [[Particle_Swarm_Optimization#J|J]]. |
Translation of [[Particle_Swarm_Optimization#J|J]]. |
||
<lang |
<lang JavaScript>function pso_init(y) { |
||
var nDims= y.min.length; |
var nDims= y.min.length; |
||
var pos=[], vel=[], bpos=[], bval=[]; |
var pos=[], vel=[], bpos=[], bval=[]; |