// update parentsets
ParentSet[] parentSets = new ParentSet[nAtts];
int nX = 0;
for (int iParentSet = 0; iParentSet < nAtts; iParentSet++) {
if (iParentSet == m_nTargetNode) {
SerializedObject so = new SerializedObject(m_ParentSet);
parentSets[iParentSet] = (ParentSet) so.getObject();
nX = 1;
} else {
parentSets[iParentSet] = m_ParentSets[iParentSet - nX];
for (int iParent = 0; iParent < parentSets[iParentSet].getNrOfParents(); iParent++) {
int nParent = parentSets[iParentSet].getParent(iParent);
if (nParent >= m_nTargetNode) {
parentSets[iParentSet].SetParent(iParent, nParent + 1);
}
}
}
}
m_ParentSets = parentSets;
// update distributions
Estimator[][] distributions = new Estimator[nAtts][];
nX = 0;
for (int iNode = 0; iNode < nAtts; iNode++) {
if (iNode == m_nTargetNode) {
SerializedObject so = new SerializedObject(m_CPT);
distributions[iNode] = (Estimator[]) so.getObject();
nX = 1;
} else {
distributions[iNode] = m_Distributions[iNode - nX];
}
}