public void delNodeValue(int nTargetNode, String sValue) throws Exception {
// update undo stack
if (m_bNeedsUndoAction) {
addUndoAction(new DelValueAction(nTargetNode, sValue));
}
Attribute att = m_Instances.attribute(nTargetNode);
int nCardinality = att.numValues();
FastVector values = new FastVector(nCardinality);
int nValue = -1;
for (int iValue = 0; iValue < nCardinality; iValue++) {
if (att.value(iValue).equals(sValue)) {
nValue = iValue;
} else {
values.addElement(att.value(iValue));
}
}
if (nValue < 0) {
// could not find value
throw new Exception("Node " + nTargetNode + " does not have value (" + sValue + ")");
}
replaceAtt(nTargetNode, att.name(), values);
// update distributions
Estimator[] distributions = m_Distributions[nTargetNode];
int nCard = values.size();
for (int iParent = 0; iParent < distributions.length; iParent++) {