public class BayesNet extends java.lang.Object implements BayesianNetwork
Modifier and Type | Field and Description |
---|---|
protected java.util.Set<Node> |
rootNodes |
protected java.util.List<RandomVariable> |
variables |
protected java.util.Map<RandomVariable,Node> |
varToNodeMap |
Modifier and Type | Method and Description |
---|---|
Node |
getNode(RandomVariable rv) |
java.util.List<RandomVariable> |
getVariablesInTopologicalOrder() |
protected java.util.Set<Node> rootNodes
protected java.util.List<RandomVariable> variables
protected java.util.Map<RandomVariable,Node> varToNodeMap
public BayesNet(Node... rootNodes)
public java.util.List<RandomVariable> getVariablesInTopologicalOrder()
getVariablesInTopologicalOrder
in interface BayesianNetwork
public Node getNode(RandomVariable rv)
getNode
in interface BayesianNetwork
rv
- the RandomVariable whose corresponding Node is to be
retrieved.