override public void SetCause(TCause cause, double priorProbability) { SpecialFunctions.CheckCondition(0.0 <= priorProbability && priorProbability <= 1.0); //!!!raise error CauseCollection[cause] = priorProbability; if (!CauseEffectCollection.ContainsKey(cause)) { CauseEffectCollection.Add(cause, new Dictionary <TEffect, double>()); } }
override public void SetLink(TCause cause, TEffect effect, double conditionalProbability) { SpecialFunctions.CheckCondition(0.0 <= conditionalProbability && conditionalProbability <= 1.0); //!!!raise error SpecialFunctions.CheckCondition(CauseEffectCollection.ContainsKey(cause), "cause not defined"); CauseEffectCollection[cause][effect] = conditionalProbability; }