Functional CAM generator
parent
94211ab723
commit
b1c40fc8e6
|
@ -99,7 +99,7 @@ class CAMParser:
|
||||||
"""
|
"""
|
||||||
x, y = list(map(int, x)), list(map(int, y))
|
x, y = list(map(int, x)), list(map(int, y))
|
||||||
def next_state(plane, neighborhood, *args):
|
def next_state(plane, neighborhood, *args):
|
||||||
if plane.grid.flat[neighborhood.flat_index]:
|
if plane.grid.flat[neighborhood.flat_index][neighborhood.bit_index]:
|
||||||
return int(neighborhood.total in x)
|
return int(neighborhood.total in x)
|
||||||
else:
|
else:
|
||||||
return int(neighborhood.total in y)
|
return int(neighborhood.total in y)
|
||||||
|
|
Loading…
Reference in New Issue