Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 5: Expansion(Genisleme)
- if score_r < results[0]: # Eger yansima sonrasi noktamiz en iyiden de iyiyse
- # bu noktada biraz daha ileri gidip abartabiliriz.
- xe = centroid + self.gamma * (-points[-1] - centroid) # ileri git
- score_e = fn(*list(xe)) # skoru hesapla
- print "E Score", score_e
- if score_r > score_e :
- # eger elde ettigimiz yer yansima yapilmis halinden bile iyiyse biraz daha ilerle
- points[-1] = xe
- print "Expansion sonrasi noktalar", points
- continue
- else:
- # degilse yansima yapilmis haliyle kalsin
- points[-1] = xr
- print "Reflection sonrasi noktalar", points
- continue
Add Comment
Please, Sign In to add comment