本文整理汇总了Python中cell.Cell.readCSV方法的典型用法代码示例。如果您正苦于以下问题:Python Cell.readCSV方法的具体用法?Python Cell.readCSV怎么用?Python Cell.readCSV使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cell.Cell
的用法示例。
在下文中一共展示了Cell.readCSV方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set
# 需要导入模块: from cell import Cell [as 别名]
# 或者: from cell.Cell import readCSV [as 别名]
print >>verilog, "\n"
# keep set of used outputs
used = set()
# keep a list of cells
cells = list()
# read cell descriptions from seed file
if options.seed:
seed = open(options.seed, 'r')
for line in seed.readlines():
line = line.strip()
if len(line) > 0:
cell = Cell.readCSV(line)
if cell is not None:
cells.append(cell)
seed.close()
# modify some of the cells
mutate = int(len(cells) * options.mutate)
print "mutating %d cells" % mutate
for i in range(mutate):
cell = random.choice(cells)
bits = random.randint(0, 16)
cell.mutateFunction(bits)
swaps = random.randint(0, 4)