Guest User

Untitled

a guest
Oct 23rd, 2019
95
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # # ///////// Koczkodaj
  2.  
  3. def koczkodajIndex(mtx):
  4. maxOfVal = 0
  5. for x in range(len(mtx)):
  6. for y in range(len(mtx)):
  7. if x == y:
  8. continue
  9. for z in range(len(mtx)):
  10. if y == z:
  11. continue
  12. inKocz = min(abs(1 - (mtx[x][z]*mtx[z][y]) / mtx[x][y]), abs(1-mtx[x][y]/(mtx[x][z]*mtx[z][y])))
  13. if inKocz > maxOfVal:
  14. maxOfVal = inKocz
  15.  
  16. return maxOfVal
RAW Paste Data