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