14 references to _counts
Microsoft.Extensions.AI.Evaluation.NLP (14)
Common\MatchCounter.cs (14)
19
public readonly int Sum() =>
_counts
.Values.Sum();
33
if (
_counts
.TryGetValue(item, out int currentCount))
35
_counts
[item] = currentCount + 1;
39
_counts
[item] = 1;
62
_counts
.Count < other.
_counts
.Count ? (
_counts
, other.
_counts
) : (other.
_counts
,
_counts
);
68
intersection.
_counts
[kvp.Key] = Math.Min(kvp.Value, otherCount);
75
public string ToDebugString() => string.Join(",",
_counts
.Select(v => $"{v.Key}: {v.Value}"));
77
public IEnumerator<KeyValuePair<T, int>> GetEnumerator() =>
_counts
.GetEnumerator();
79
IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable)
_counts
).GetEnumerator();