Animation for multiplication of two vectors

The MoPL-3 listing is stated below.

Please enable JAVA to see this applet !


array          VectorP         [1:4, 1:1] of int; 
               VectorQ         [1:1, 1:4] of int; 
               Result          [1:1, 1:1] of int; 

scanPattern    RowScan         is 3 steps [1,0]; 
               ColScan         is 3 steps [0,1]; 

window         ProductW is 
               SW_P, SW_Q, SW_R [1:1, 1:1] of int; 

rALUsubnet     Product of ProductW is 
                 SW_R [1,1] = SW_R[1,1] + SW_P[1,1] * SW_Q[1,1]; 

begin 
  with ProductW do begin 
    activate Product; 
    move SW_P to VectorP [1,1]; 
    move SW_Q to VectorQ [1,1]; 
    move SW_R to Result  [1,1]; 
    parbegin 
      RowScan[SW_P]; 
      ColScan[SW_Q]; 
    parend; 
  end; 
end; 


 

© Copyright 1997, Xputer Laboratory, University of Kaiserslautern, Kaiserslautern, Germany - Webmaster