nbnv: number of nodes/variables for a /nom/ or an /object@nom/

Description Usage Arguments Details Value Examples

View source: R/f1.rbsb2.code.r

Description

According to 'what', returns the number of nodes/variables for a nom or an object comprising a slot @nom.

Usage

1
nbnv(x, what=-1)

Arguments

x

the bn/gn/dn/gn or nom object

what

-1: returns the number of nodes 0: returns the total number of variables i: returns the number of variables of the i-th node. (For convenience 'n' is translated as -1 and 'v' is translated as 0).

Details

no check is performed.

Value

The number of nodes or variables, accordingly to what

Examples

1
2
3
 rbsb3k("RESET"); # needed only for R checking, to be forgotten
 nbnv(rbsb.nom2); # number of nodes
 nbnv(rbsb.nom2, 0); # number of variates 

rbsb documentation built on May 2, 2019, 4:41 p.m.

Related to nbnv in rbsb...