Research Article

GPU-Based Parallel Particle Swarm Optimization Methods for Graph Drawing

Pseudocode 1

Pseudocode of S-PGD.
% Initialization
Set the values for the parameters , , and ;
Randomly initialize the position vector for each particle , for ;
Randomly initialize the velocity vector for each particle , for ;
for to
  % Computation of fitness for each particle
  for to
    ;
    for to
      for to
        if
         compute ;
         compute using (2);
         compute using (3);
         compute using (10);
         ;
      
    % Update and
    If , then , ;
    If , then , ;
    % Update and
    Update using (4);
    Update using (5);
  
Output the final best layout .