routes: Get routes matrix for a 'bn'.

Description Usage Arguments Details Value Examples

View source: R/properties.R

Description

Returns a matrix encoding the number of routes between the nodes of the bn x.

Usage

1
  routes(x)

Arguments

x

An object of class 'bn'.

Details

Element (i, j) contains the number of routes from node i to node j for i != j Element (i, i) contains 1 for all i.

Value

A matrix of dimension nNodes(x) x nNodes(x)

Examples

1
2
x <- bn(c(), c(3), c(1), c(1, 2))
routes(x)

rjbgoudie/parental documentation built on May 27, 2019, 9:11 a.m.