Research Article

A Cost-Effective Smoothed Multigrid with Modified Neighborhood-Based Aggregation for Markov Chains

Algorithm 3

Neighborhood-Based aggregation, .
Input:
  : scaled problem matrix,
  : tolerance.
Output:
  : aggregation matrix.
  1st process: generate the initial aggregates
(1) Set and .
(2) for    do
(3)  construct strong neighborhoods based on (19).
(4)  if    then
(5)   .
(6)   
(7)   .
(8)  end if
(9) end for
   2nd process: connect the remaining nodes to their most connected aggregates
(10) while    do
(11) pick and set .
(12)  and .
(13) end while
   3rd process: construct the aggregation matrix  
(14) for    do
(15) if  ,   then
(16)  .
(17) else
(18)  .
(19) end if
(20) end for
(21) return  ;