Pink Graph IO¶
|
Read a graph file stored in pink ascii format |
|
Save a (vertex/edge weighted) graph in the pink ascii file format. |
-
read_graph_pink
(filename)[source]¶ Read a graph file stored in pink ascii format
- Parameters:
filename – path to the graph file
- Returns:
a tuple (graph, vertex_weights, edge_weights)
-
save_graph_pink
(filename, graph, vertex_weights=None, edge_weights=None, shape=None)[source]¶ Save a (vertex/edge weighted) graph in the pink ascii file format.
- Parameters:
filename – path to the graph file (will be overwritten if the file already exists!)
graph – graph to save (Concept
CptGridGraph
)edge_weights – edge weights of the graph (optional)
vertex_weights – vertex weights of the graph (optional)
shape – shape of the graph (optional) (deduced from
CptGridGraph
)
- Returns:
nothing