UndiGraph.partialUndiGraph
- UndiGraph.partialUndiGraph(nodes)
- Parameters:
nodes (
set[int]) – The set of nodes composing the partial graph- Returns:
The partial graph formed by the nodes given in parameter
- Return type:
Example
import pyagrum as gum
g = gum.fastUndiGraph("A-B-C;C-D")
sub = g.partialUndiGraph({0, 1, 3})
sorted(sub.nodes())
# [0, 1, 3]
sub.edges()
# {(0, 1)}
Used by
UndiGraph, ChainGraph, CliqueGraph, MixedGraph, PDAG
