SparseGraph6#

用于以 graph6sparse6 文件格式读取和写入图的函数。

根据这些格式的作者的说法,

graph6sparse6 是一种紧凑地存储无向图的格式,仅使用可打印的 ASCII 字符。这些格式的文件类型为文本,每图占一行。

graph6 适用于小型图或大型密集图。sparse6 对于大型稀疏图更节省空间。

graph6 和 sparse6 主页

Graph6#

用于以 graph6 格式读取和写入图的函数。

graph6 文件格式适用于小型图或大型密集图。对于大型稀疏图,请使用 sparse6 格式。

欲了解更多信息,请参阅 graph6 主页。

from_graph6_bytes(bytes_in)

从字节串中读取 graph6 格式的简单无向图。

read_graph6(path)

从路径中读取 graph6 格式的简单无向图。

to_graph6_bytes(G[, nodes, header])

将简单无向图转换为 graph6 格式的字节串。

write_graph6(G, path[, nodes, header])

将简单无向图以 graph6 格式写入路径。

Sparse6#

用于以 sparse6 格式读取和写入图的函数。

sparse6 文件格式是一种适用于大型稀疏图的节省空间的格式。对于小型图或大型密集图,请使用 graph6 文件格式。

欲了解更多信息,请参阅 sparse6 主页。

from_sparse6_bytes(string)

从字符串中读取 sparse6 格式的无向图。

read_sparse6(path)

从路径中读取 sparse6 格式的无向图。

to_sparse6_bytes(G[, nodes, header])

将无向图转换为 sparse6 格式的字节串。

write_sparse6(G, path[, nodes, header])

将图 G 以 sparse6 格式写入指定路径。