// : the initial network
 Put each node of in its own community;
while  some nodes are moved do
  for  each node of   do
   Place in its neighboring community including
    its own which maximizes the modularity gain;
  end for
end while
if the new modularity is higher than the initial then
   the network between communities of ;
end if
end repeat
Algorithm 1: Pseudocode of the Louvain algorithm [26].