Guest User

Untitled

a guest
Jan 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. # 5: Expansion(Genisleme)
  2. if score_r < results[0]: # Eger yansima sonrasi noktamiz en iyiden de iyiyse
  3. # bu noktada biraz daha ileri gidip abartabiliriz.
  4. xe = centroid + self.gamma * (-points[-1] - centroid) # ileri git
  5. score_e = fn(*list(xe)) # skoru hesapla
  6. print "E Score", score_e
  7. if score_r > score_e :
  8. # eger elde ettigimiz yer yansima yapilmis halinden bile iyiyse biraz daha ilerle
  9. points[-1] = xe
  10. print "Expansion sonrasi noktalar", points
  11. continue
  12. else:
  13. # degilse yansima yapilmis haliyle kalsin
  14. points[-1] = xr
  15. print "Reflection sonrasi noktalar", points
  16. continue
Add Comment
Please, Sign In to add comment