public BayesNet(params Node[] rootNodes)
{
if (null == rootNodes)
{
throw new IllegalArgumentException(
"Root Nodes need to be specified.");
}
foreach (Node n in rootNodes)
{
this.rootNodes.add(n);
}
if (this.rootNodes.size() != rootNodes.Length)
{
throw new IllegalArgumentException(
"Duplicate Root Nodes Passed in.");
}
// Ensure is a DAG
checkIsDAGAndCollectVariablesInTopologicalOrder();
//variables = Collections.unmodifiableList(variables);
}