Beispiel #1
0
 public void Sub(KeyedVector <TIndex> vec)
 {
     foreach (var pair in vec)
     {
         Dict[pair.Key] -= pair.Value;
     }
 }
Beispiel #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);
        }
Beispiel #3
0
 public bool IsBigger(KeyedVector <TIndex> smaller)
 {
     foreach (var pair in smaller)
     {
         if (pair.Value >= this[pair.Key])
         {
             return(false);
         }
     }
     return(true);
 }