daily pastebin goal
77%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CALC_LEN_PATH(G, A, B, LEN){
  2.     G2 = G // copy
  3.     for t=1 to n{
  4.         G3 = ZeroMatrix
  5.         for k = 1 to n{
  6.             for i = 1 to n{
  7.                 for j = 1 to n{
  8.                     if(G2[i][k]>0 and G[k][j]>0){
  9.                         G3 += G2[i][k]
  10.                     }
  11.                 }
  12.             }
  13.         }
  14.         G2 = G3 //copy
  15.     }
  16.     return G2
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top