< Summary

Information
Class: MoreStructures.Lists.Sorting.QuickSort.EndIndexPivotSelectionStrategy
Assembly: MoreStructures
File(s): /home/runner/work/MoreStructures/MoreStructures/MoreStructures/Lists/Sorting/QuickSort/EndIndexPivotSelectionStrategy.cs
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 23
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
Select(...)100%1100%

File(s)

/home/runner/work/MoreStructures/MoreStructures/MoreStructures/Lists/Sorting/QuickSort/EndIndexPivotSelectionStrategy.cs

#LineLine coverage
 1namespace MoreStructures.Lists.Sorting.QuickSort;
 2
 3/// <summary>
 4/// A <see cref="IPivotSelectionStrategy"/> always picking the highest index of the window.
 5/// </summary>
 6/// <remarks>
 7/// Time and Space Complexity are O(1).
 8/// <br/>
 9/// Like for <see cref="StartIndexPivotSelectionStrategy"/>, it makes quicksort run in quadratic time on pathological
 10/// input configurations, e.g. when window is already sorted in descending order.
 11/// <br/>
 12/// To avoid phatological scenarios with this <see cref="IPivotSelectionStrategy"/>, setup a
 13/// <see cref="IShuffleStrategy"/> in the <see cref="RecursiveQuickSort"/> instance, different from
 14/// <see cref="IdentityShuffleStrategy"/>.
 15/// </remarks>
 16public class EndIndexPivotSelectionStrategy : IPivotSelectionStrategy
 17{
 18    /// <inheritdoc path="//*[not(self::remarks)]"/>
 19    /// <remarks>
 20    /// This specific implementation always picks the <paramref name="end"/> index.
 21    /// </remarks>
 60122    public int Select<T>(IList<T> list, IComparer<T> comparer, int start, int end) => end;
 23}