Fixed costs and view grid function so that we have better routes and less expansion.

This commit is contained in:
Matt Guthaus
2017-04-24 10:27:04 -07:00
parent 55ed6212a1
commit 96f1eb413e
5 changed files with 220 additions and 108 deletions
-7
View File
@@ -136,10 +136,3 @@ class vector3d():
""" Min of both values """
return vector3d(min(self.x,other.x),min(self.y,other.y),min(self.z,other.z))
def hpwl(self, other):
""" Return half perimeter wire length from point to another.
Either point can have positive or negative coordinates. """
hpwl = max(abs(self.x-other.x),abs(other.x-self.x))
hpwl += max(abs(self.y-other.y),abs(other.y-self.y))
hpwl += max(abs(self.z-other.z),abs(other.z-self.z))
return hpwl