int iTargetNode = 0;
for (int iParentSet = 0; iParentSet < nAtts; iParentSet++) {
if (iTargetNode < m_nodes.size()
&& (Integer) m_nodes.elementAt(iTargetNode) == (Integer) iParentSet) {
SerializedObject so = new SerializedObject(m_ParentSet[iTargetNode]);
parentSets[iParentSet] = (ParentSet) so.getObject();
iTargetNode++;
} else {
parentSets[iParentSet] = m_ParentSets[iParentSet - iTargetNode];
for (int iParent = 0; iParent < parentSets[iParentSet].getNrOfParents(); iParent++) {
int nParent = parentSets[iParentSet].getParent(iParent);
parentSets[iParentSet].SetParent(iParent, offset[nParent]);
}
}
}
m_ParentSets = parentSets;
// update distributions
Estimator[][] distributions = new Estimator[nAtts][];
iTargetNode = 0;
for (int iNode = 0; iNode < nAtts; iNode++) {
if (iTargetNode < m_nodes.size() && (Integer) m_nodes.elementAt(iTargetNode) == (Integer) iNode) {
SerializedObject so = new SerializedObject(m_CPT[iTargetNode]);
distributions[iNode] = (Estimator[]) so.getObject();
iTargetNode++;
} else {
distributions[iNode] = m_Distributions[iNode - iTargetNode];
}
}