Beispiel #1
0
        private int CountConflictsNumber(DomainSet set, Dictionary <Variable, DomainSet> other)
        {
            int conflictsN = 0;

            other = other.Where(x => !x.Value.Value.Empty).ToDictionary(p => p.Key, p => p.Value);
            foreach (var p in other)
            {
                if (set.CanConstruct(p.Value.Value))
                {
                    ++conflictsN;
                }
            }
            return(conflictsN);
        }