Esempio n. 1
0
 public void Sub(KeyedVector <TIndex> vec)
 {
     foreach (var pair in vec)
     {
         Dict[pair.Key] -= pair.Value;
     }
 }
Esempio n. 2
0
        public KeyedVector <TIndex> SubNew(KeyedVector <TIndex> vec)
        {
            var result = Clone();

            foreach (var pair in vec)
            {
                result.Dict[pair.Key] -= pair.Value;
            }
            return(result);
        }
Esempio n. 3
0
 public bool IsBigger(KeyedVector <TIndex> smaller)
 {
     foreach (var pair in smaller)
     {
         if (pair.Value >= this[pair.Key])
         {
             return(false);
         }
     }
     return(true);
 }