countGraphs: Count the number of possible parents

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/countGraphs.R

Description

Counts the number of choices of parents given a maximum in-degree restriction.

Usage

1
countGraphs(nodes, max.indeg)

Arguments

nodes

A positive integer specifying the number of nodes in the network.

max.indeg

A positive integer specifying the in-degree restriction.

Details

Nodes can be a parent to themselves. The number of possible networks is given by:
nodes*countGraphs(nodes,max.indeg)

Value

Returns an integer given by ∑_{i=0}^m{n \choose i}, where nodes=n and max.indegree=m

Author(s)

Simon Spencer

See Also

interventionalInference, interventionalDBN-package

Examples

1
2
countGraphs(10,3) # 176, the number of possible parent sets for each node.
10*countGraphs(10,3) # 1760, the total number of possible networks.

interventionalDBN documentation built on May 30, 2017, 8:24 a.m.