Node: Node

Description Format Value Fields Methods

Description

This is a base class representing a node in a DAG. Is not intended to be used by a regular user. Developers only here!

Format

Object of R6Class with methods for constructing a DAG.

Value

Object of Node

Fields

parents

a list of parent nodes

children

a list of child nodes

name

a tag name applied to the node

Methods

new(parents = list(), children = list(), name)

creates a new Node with parent nodes, child nodes, and a name.

logDensity()

calculate the log probability density/mass function evaluated at the current node value.

addChild(node)

add node as a child. Returns node.

addParent(node)

add node as a parent. Returns node.

removeParent(name)

remove the parent node named name. Returns node.

removeChild(name)

remove the child node named name. Returns node.


sourceR documentation built on Aug. 31, 2020, 5:06 p.m.

Related to Node in sourceR...