本文整理汇总了Python中stats.Stats.print_summary方法的典型用法代码示例。如果您正苦于以下问题:Python Stats.print_summary方法的具体用法?Python Stats.print_summary怎么用?Python Stats.print_summary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类stats.Stats
的用法示例。
在下文中一共展示了Stats.print_summary方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Data
# 需要导入模块: from stats import Stats [as 别名]
# 或者: from stats.Stats import print_summary [as 别名]
d = Data("rowdata.txt", "coldata.txt")
b = Board('starter_board.txt')
# create lists of all possible configurations for rows/columns
generate_all_possible(b, d)
print('Generated all possibles from rules in %.3f sec' % s.get_elapsed())
# start game loop
solved_this_round = -1 # start with non-zero
while solved_this_round != 0:
b.print()
s.iterate()
filter_possibles(b)
solved_this_round = apply_certainties(b)
print('== COMPLETE ==')
count = 0
for index, possibles in enumerate(b.possiblerows):
if len(possibles) > 1:
count += 1
print("Unsolved for row %d, number of possibilities: %d" % (index, len(possibles)))
for index, possibles in enumerate(b.possiblecols):
if len(possibles) > 1:
count += 1
print("Unsolved for column %d, number of possibilities: %d" % (index, len(possibles)))
b.print()
if count == 0:
print('*=*=*=* SUCCESS *=*=*=*')
s.print_summary()