PDAG.addNodes

PDAG.addNodes(n)

Add n new nodes to the graph.

Parameters:

n (int) – the number of nodes to add

Return type:

set[int]

Example

import pyagrum as gum

pdag = gum.PDAG()
pdag.addNodes(3)
# {0, 1, 2}
pdag.size()
# 3

Used by

PDAG, ChainGraph

Inheritance diagram of pyagrum.PDAG, pyagrum.ChainGraph