The Scientific World Journal / 2014 / Article / Alg 2

Research Article

PEM-PCA: A Parallel Expectation-Maximization PCA Face Recognition Architecture

Algorithm 2

Parallel matrix manipulation with matrix computation.
Input:   Matrix  left,   Matrix  right
Output:   Matrix  result
(1)    //  Matrix  Subtraction
(2)    parallel  for  i  from  0  to  rows
(3)    for  j  from  0  to  cols
(4)       Subtraction:  
(5)endfor
(6)    endfor
(7)
(8)    //    Matrix  Multiplication
(9)    for  i  from  0  to  leftRows
(10)  parallel  for  j  from  0  to  rightColumns
(11)    for  k  from  0  to  leftColumns
(12)     Calculate  sum:     +=   ;
(13)    endfor
(14)   ;
(15)  endfor
(16)endfor
(17)
(18)   //    Matrix  Transpose
(19)parallel  for  i  from  0  to  rows
(20)  for  j  from  0  to  cols
(21)    Transpose  by  convert  row  to  column:   ;
(22)  endfor
(23)endfor
(24)return  result;