Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System.Runtime.CompilerServices;
using Platform.Interfaces;

#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member

namespace Platform.Data.Doublets.Sequences.Frequencies.Counters
{
/// <summary>
/// Counts total amount of sequences in which the symbol (link) is used.
/// </summary>
public class TotalMarkedSequenceSymbolFrequencyCounter<TLink> : ICounter<TLink, TLink>
{
private readonly ILinks<TLink> _links;
private readonly ICriterionMatcher<TLink> _markedSequenceMatcher;

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public TotalMarkedSequenceSymbolFrequencyCounter(ILinks<TLink> links, ICriterionMatcher<TLink> markedSequenceMatcher)
{
_links = links;
_markedSequenceMatcher = markedSequenceMatcher;
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public TLink Count(TLink argument) => new TotalMarkedSequenceSymbolFrequencyOneOffCounter<TLink>(_links, _markedSequenceMatcher, argument).Count();
}
}
Loading