techniques.BN
Class BayesNet
java.lang.Object
|
+--techniques.BN.BayesNet
- All Implemented Interfaces:
- Cloneable
- public class BayesNet
- extends Object
- implements Cloneable
Maintains a bayes net
BayesNet
public BayesNet()
getNode
public Variable getNode(String nodeName)
- Returns node with given name
addNode
public void addNode(Variable node)
- Parameters:
node
-
getNodes
public LinkedList getNodes()
- Returns nodes in the net sorted.
- Parameters:
nodeName
- - Returns:
- list of nodes
getNodesWithTopologicalOrdering
public LinkedList getNodesWithTopologicalOrdering()
- Returns nodes in the net sorted in topological order from parents to
children, i.e. if possible makes all parents show up before their children.
- Parameters:
nodeName
- - Returns:
- list of nodes
getNumOfNodes
public int getNumOfNodes()
clone
public Object clone()
throws CloneNotSupportedException
- Performs a shallow copy (variables are not cloned)
deepCopy
public Object deepCopy()
throws CloneNotSupportedException
- Performs a deep copy (variables are cloned)
printNetwork
public void printNetwork()