DiGraph.existsNode

DiGraph.existsNode(id)

Check if a node with a certain id exists in the graph.

Parameters:

id (int) – the checked id

Returns:

True if the node exists

Return type:

bool

Example

import pyagrum as gum

g = gum.fastDiGraph("A->B")
g.existsNode(1)
# True
g.existsNode(5)
# False

Used by

DiGraph, DAG

Inheritance diagram of pyagrum.DiGraph, pyagrum.DAG

Overridden in

MixedGraph.existsNode, PDAG.existsNode