UndiGraph.saveGUMstring
- UndiGraph.saveGUMstring(indent=None)
Save the graph as a jgum string (see
pyagrum.graphFromGUMStringto read it back).- Parameters:
indent (
int, optional) – JSON indentation: -1 for the most compact output, N>=0 to pretty-print with N spaces. Defaults topyagrum.config["core","jgumIndent"].- Returns:
the jgum string
- Return type:
str
Example
import pyagrum as gum
g = gum.fastUndiGraph("A-B")
print(g.saveGUMstring(indent=-1))
# {"type":"UndiGraph","GumJsonVersion":"1.1","nodes":[0,1],"names":{"0":"A","1":"B"},"arcs":[],"edges":[[0,1]],"markedEdges":[]}
Class
Overridden in
ChainGraph.saveGUMstring, MixedGraph.saveGUMstring, PDAG.saveGUMstring