test_stressing.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:qcgc 作者: ntruessel 项目源码 文件源码
def to_dot(self, filename, edges):
        from pygraphviz import AGraph
        dot = AGraph(directed=True)
        for n in edges.keys():
            dot.add_node(str(n))
            if lib.qcgc_arena_get_blocktype(ffi.cast("cell_t *", n)) not in [
                    lib.BLOCK_BLACK, lib.BLOCK_WHITE]:
                node = dot.get_node(str(n))
                node.attr['color'] = 'red'
        for n in edges.keys():
            if edges[n] is not None:
                dot.add_edge(str(n), str(edges[n]))
        dot.layout(prog='dot')
        dot.draw(filename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号