/// <summary>Subtracts the counts in the given Counter from the counts in this Counter.</summary> /// <remarks> /// Subtracts the counts in the given Counter from the counts in this Counter. /// <p> /// To copy the values from another Counter rather than subtracting them, use /// </remarks> public virtual void SubtractAll(Edu.Stanford.Nlp.Stats.IntCounter <E> counter) { foreach (E key in map.Keys) { DecrementCount(key, counter.GetIntCount(key)); } }
/// <summary>Adds the counts in the given Counter to the counts in this Counter.</summary> /// <remarks> /// Adds the counts in the given Counter to the counts in this Counter. /// <p> /// To copy the values from another Counter rather than adding them, use /// </remarks> public virtual void AddAll(Edu.Stanford.Nlp.Stats.IntCounter <E> counter) { foreach (E key in counter.KeySet()) { int count = counter.GetIntCount(key); IncrementCount(key, count); } }