Search Results for

    Show / Hide Table of Contents

    Class SuffixAgainstPatternComparer

    An of System.Int32, which compares a suffix System.String of Text against the provided System.String pattern, and ignores the second System.Int32 value.

    Inheritance
    System.Object
    SuffixAgainstPatternComparer
    IndexModKPartialSuffixArrayAgainstPatternComparer
    SuffixArrayAgainstPatternComparer
    Namespace: MoreStructures.BurrowsWheelerTransform.Matching.Comparers
    Assembly: MoreStructures.dll
    Syntax
    public abstract class SuffixAgainstPatternComparer : IComparer<int>

    Constructors

    | Improve this Doc View Source

    SuffixAgainstPatternComparer(TextWithTerminator, IEnumerable<Char>)

    Declaration
    protected SuffixAgainstPatternComparer(TextWithTerminator text, IEnumerable<char> pattern)
    Parameters
    Type Name Description
    TextWithTerminator text

    IEnumerable<System.Char> pattern

    Properties

    | Improve this Doc View Source

    CharComparer

    The of System.Char, to be used to compare single chars of the strings to compare (suffixes and pattern).

    Declaration
    public IComparer<char> CharComparer { get; }
    Property Value
    Type Description
    IComparer<System.Char>
    | Improve this Doc View Source

    LongestMatch

    The maximum amount of chars of the pattern matched, since the instantiation of this comparer.

    Declaration
    public int LongestMatch { get; protected set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    It is never reset. To start over, a new instance of this comparer has to be created.

    | Improve this Doc View Source

    LongestMatchFirstValue

    The value of the first term of comparison, which resulted in LongestMatch chars matched, when comparing the suffix starting at LongestMatchFirstValue against the pattern.

    Declaration
    public int LongestMatchFirstValue { get; protected set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    If multiple values of the first term resulted in the same amount of chars matched, the first value encountered is kept.

    | Improve this Doc View Source

    Pattern

    The pattern, to compare against each suffix of Text.

    Declaration
    public IEnumerable<char> Pattern { get; }
    Property Value
    Type Description
    IEnumerable<System.Char>
    | Improve this Doc View Source

    Text

    The text, to extract suffixes from.

    Declaration
    public TextWithTerminator Text { get; }
    Property Value
    Type Description
    TextWithTerminator

    Methods

    | Improve this Doc View Source

    Compare(Int32, Int32)

    Compares the suffix of text identified by x against the pattern.

    Declaration
    public abstract int Compare(int x, int y)
    Parameters
    Type Name Description
    System.Int32 x

    The index, in the complete Suffix Array, of the suffix which is first term of comparison.

    System.Int32 y

    Ignored.

    Returns
    Type Description
    System.Int32

    A positive value if there is mismatch and the suffix is bigger than the pattern lexicographically.
    A negative value if there is mismatch and the suffix is smaller than the pattern lexicographically.
    The value 0 if there is full match and pattern and text are of the same length or pattern is shorter.
    The value -1 if there is full match but the pattern is longer than the suffix.

    | Improve this Doc View Source

    CompareSuffixAgainstPattern(Int32, Int32)

    Compares the suffix of Text starting at index suffixStartIndex against Pattern, returning the result of the comparison as a positive, null or negative System.Int32.

    Declaration
    protected virtual int CompareSuffixAgainstPattern(int bwtIndex, int suffixStartIndex)
    Parameters
    Type Name Description
    System.Int32 bwtIndex

    The index, in the Burrows-Wheeler Transform, of the first char of the suffix starting at suffixStartIndex.

    System.Int32 suffixStartIndex

    The index of Text where suffixStartIndex starts.

    Returns
    Type Description
    System.Int32

    A positive System.Int32, if the suffix is lexicographically bigger than Pattern.
    A negative System.Int32, if the suffix is lexicographically smaller than Pattern.
    Zero, when there is a match, and the suffix is either of longer or of the same length as Pattern.

    Extension Methods

    SuffixStructureNodeExtensions.GetAllSuffixesFor<TEdge, TNode>(TNode, TextWithTerminator)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX