Better polarity match
This commit is contained in:
@@ -1480,9 +1480,12 @@ def valid_polarized_assignment(builder, sector_list):
|
|||||||
others = [x for x in full_list if x != sector]
|
others = [x for x in full_list if x != sector]
|
||||||
other_mag = sum_magnitude(others)
|
other_mag = sum_magnitude(others)
|
||||||
sector_mag = sector.magnitude()
|
sector_mag = sector.magnitude()
|
||||||
|
hookable = False
|
||||||
for i in range(len(sector_mag)):
|
for i in range(len(sector_mag)):
|
||||||
if sector_mag[i] > 0 and other_mag[i] == 0:
|
if sector_mag[i] > 0 and other_mag[i] > 0:
|
||||||
return False
|
hookable = True
|
||||||
|
if not hookable:
|
||||||
|
return False
|
||||||
# dead_ends = 0
|
# dead_ends = 0
|
||||||
# branches = 0
|
# branches = 0
|
||||||
# for sector in sector_list:
|
# for sector in sector_list:
|
||||||
|
|||||||
Reference in New Issue
Block a user