* @param instances the instances to work with
* @throws Exception if attribute from BIF file could not be found
*/
public void buildStructure (BayesNet bayesNet, Instances instances) throws Exception {
// read network structure in BIF format
BIFReader bifReader = new BIFReader();
bifReader.processFile(m_sBIFFile);
// copy parent sets
for (int iAttribute = 0; iAttribute < instances.numAttributes(); iAttribute++) {
int iBIFAttribute = bifReader.getNode(bayesNet.getNodeName(iAttribute));
ParentSet bifParentSet = bifReader.getParentSet(iBIFAttribute);
for (int iBIFParent = 0; iBIFParent < bifParentSet.getNrOfParents(); iBIFParent++) {
String sParent = bifReader.getNodeName(bifParentSet.getParent(iBIFParent));
int iParent = 0;
while (iParent < instances.numAttributes() && !bayesNet.getNodeName(iParent).equals(sParent)) {
iParent++;
}
if (iParent >= instances.numAttributes()) {