AIMA.Core.Probability.BayesNet.consistent C# (CSharp) Method

consistent() private method

private consistent ( bool>.Dictionary sample, bool>.Dictionary evidence ) : bool
sample bool>.Dictionary
evidence bool>.Dictionary
return bool
        private bool consistent(Dictionary<String, bool> sample, Dictionary<String, bool> evidence)
        {
            foreach (string key in evidence.Keys)
            {
                bool value = (bool)evidence[key];
                if (!(value.Equals(sample[key])))
                {
                    return false;
                }
            }
            return true;
        }