MarkedGraph.nameFromId
- MarkedGraph.nameFromId(id)
Return the name of a node, or its id as a string if no name was set.
- Parameters:
id (
int) – the node id- Returns:
the name associated with the node, or
str(id)if the node has no name- Return type:
str
Example
import pyagrum as gum
g = gum.MarkedGraph()
g.addNodes(2)
g.setName(0, "A")
g.nameFromId(0), g.nameFromId(1)
# ('A', '1')
Used by
