< Summary

Information
Class: MoreStructures.SuffixArrays.SuffixArray
Assembly: MoreStructures
File(s): /home/runner/work/MoreStructures/MoreStructures/MoreStructures/SuffixArrays/SuffixArray.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 35
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_Indexes()100%1100%

File(s)

/home/runner/work/MoreStructures/MoreStructures/MoreStructures/SuffixArrays/SuffixArray.cs

#LineLine coverage
 1namespace MoreStructures.SuffixArrays;
 2
 3/// <summary>
 4/// The Suffix Array of a terminator-terminated text T is an <see cref="int"/> sequence where the i-th element is the
 5/// index in T of the 1st char of a suffix Si of T, and Si &lt; Sj for each i &lt; j.
 6/// </summary>
 7/// <remarks>
 8///     Suffixes of the terminator-terminated text "mississippi$" are:
 9///     <br/>
 10///     - "mississippi$", at index 0;
 11///       <br/>
 12///     - "ississippi$", at index 1;
 13///       <br/>
 14///     - "ssissippi$", at index 2;
 15///       <br/>
 16///     - etc.
 17///     <br/>
 18///     Sorting suffixes in lexicographic order gives:
 19///     - "$mississippi", at index 11;
 20///       <br/>
 21///     - "i$", at index 10;
 22///       <br/>
 23///     - "ippi$", at index 7;
 24///       <br/>
 25///     - "issippi$", at index 4;
 26///       <br/>
 27///     - etc.
 28///     <br/>
 29///     So the Suffix Array of "mississippi$" is { 11, 10, 7, 4, ... }.
 30/// </remarks>
 31/// <param name="Indexes">
 32/// The sequence of indexes, each one marking the beginning of a suffix of the text. Is a <see cref="IEnumerable{T}"/>,
 33/// rather than an <see cref="IList{T}"/>, so that values can be generated lazily and dynamically.
 34/// </param>
 35735public record struct SuffixArray(IEnumerable<int> Indexes);

Methods/Properties

get_Indexes()