NodeChildren {RNetica} | R Documentation |
The children of a node parent are the nodes which are directly
connected to parent with an edge oriented from
parent. The function NodeChildren(parent)
returns a
list of the children of parent
NodeChildren(parent)
parent |
A |
The function NodeChildren(parent)
only returns the immediate
descendants of parent
. A list of all descendants can be found
using the function
GetRelatedNodes(parent,"decendents")
.
The function link{NodeParents}()
returns the opposite end of the
link, however, unlike NodeParents()
, NodeChildren()
cannot be directly set.
A list (possibly empty) of NeticaNode
objects
which are the children of parent.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: GetNodeChildren_bn()
NeticaNode
, AddLink()
,
NodeParents()
, GetRelatedNodes()
sess <- NeticaSession() startSession(sess) chnet <- CreateNetwork("ChildcareCenter", session=sess) mom <- NewContinuousNode(chnet,"Mother") stopifnot( length(NodeChildren(mom))==0 ) daughters <- NewDiscreteNode(chnet,paste("Daughter",1:3,sep="")) sapply(daughters, function(d) AddLink(mom,d)) stopifnot( length(NodeChildren(mom))==3, all(match(daughters,NodeChildren(mom),nomatch=0))>0 ) DeleteNetwork(chnet) stopSession(sess)