AIMA.Probability.Bayes.Impl.CPT.getConditioningCase C# (CSharp) Method

getConditioningCase() public method

public getConditioningCase ( ) : CategoricalDistribution
return AIMA.Probability.CategoricalDistribution
	public CategoricalDistribution getConditioningCase(params Object[] parentValues) {
		if (parentValues.Length != parents.Count) {
			throw new ArgumentException(
					"The number of parent value arguments ["
							+ parentValues.Length
							+ "] is not equal to the number of parents ["
							+ parents.Count + "] for this CPT.");
		}
		AssignmentProposition[] aps = new AssignmentProposition[parentValues.Length];
		int idx = 0;
		foreach (RandomVariable parentRV in parents) {
			aps[idx] = new AssignmentProposition(parentRV, parentValues[idx]);
			idx++;
		}

		return getConditioningCase(aps);
	}