Пример #1
0
        public DefaultValueDictionary <TKey, TValue> Meet(DefaultValueDictionary <TKey, TValue> left, DefaultValueDictionary <TKey, TValue> right)
        {
            var met = new DefaultValueDictionary <TKey, TValue> (left);

            foreach (var kvp in right)
            {
                TKey   key        = kvp.Key;
                TValue rightValue = kvp.Value;
                met.Set(key, ValueLattice.Meet(left.Get(key), rightValue));
            }
            return(met);
        }
Пример #2
0
 public DictionaryLattice(TValueLattice valueLattice)
 {
     ValueLattice = valueLattice;
     Top          = new DefaultValueDictionary <TKey, TValue> (valueLattice.Top);
 }