UndiGraph.existsNode

UndiGraph.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.fastUndiGraph("A-B")
g.existsNode(1)
# True
g.existsNode(5)
# False

Used by

UndiGraph, CliqueGraph

Inheritance diagram of pyagrum.UndiGraph, pyagrum.CliqueGraph

Overridden in

MixedGraph.existsNode, PDAG.existsNode