Skip to content

Latest commit

 

History

History
167 lines (160 loc) · 41.8 KB

SortingNetworks.SNBestKnown.md

File metadata and controls

167 lines (160 loc) · 41.8 KB

SNBestKnown Class

Sorting networks implementation using the best known arrangement of comparators.

public abstract class SNBestKnown : SortingNetworks.SNBoseNelson

Inheritance System.Object 🡒 SNBase 🡒 SNBoseNelson 🡒 SNBestKnown

Remarks

Custom arrangement or comparators are used only for length between [9, 16] otherwise Bose-Nelson algorithm is used.
SWAP macros generated from: https://pages.ripco.net/~jgamble/nw.html

Fields
MaxLength The maximum supported length for sorting.
MinLength The minimum supported length for sorting.
Methods
Sort10Ascending<T>(T, Comparison<T>) Sorts a collection of 10 elements in ascending order using the specified System.Comparison<>.
Sort10Ascending<T>(T) Sorts a collection of 10 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort10AscendingBranchless(byte) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10AscendingBranchless(int) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10AscendingBranchless(sbyte) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10AscendingBranchless(short) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10AscendingBranchless(uint) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10AscendingBranchless(ushort) Sorts a collection of 10 elements in ascending order using branchless min/max swap.
Sort10Descending<T>(T, Comparison<T>) Sorts a collection of 10 elements in descending order using the specified System.Comparison<>.
Sort10Descending<T>(T) Sorts a collection of 10 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort10DescendingBranchless(byte) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort10DescendingBranchless(int) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort10DescendingBranchless(sbyte) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort10DescendingBranchless(short) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort10DescendingBranchless(uint) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort10DescendingBranchless(ushort) Sorts a collection of 10 elements in descending order using branchless min/max swap.
Sort11Ascending<T>(T, Comparison<T>) Sorts a collection of 11 elements in ascending order using the specified System.Comparison<>.
Sort11Ascending<T>(T) Sorts a collection of 11 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort11AscendingBranchless(byte) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11AscendingBranchless(int) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11AscendingBranchless(sbyte) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11AscendingBranchless(short) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11AscendingBranchless(uint) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11AscendingBranchless(ushort) Sorts a collection of 11 elements in ascending order using branchless min/max swap.
Sort11Descending<T>(T, Comparison<T>) Sorts a collection of 11 elements in descending order using the specified System.Comparison<>.
Sort11Descending<T>(T) Sorts a collection of 11 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort11DescendingBranchless(byte) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort11DescendingBranchless(int) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort11DescendingBranchless(sbyte) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort11DescendingBranchless(short) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort11DescendingBranchless(uint) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort11DescendingBranchless(ushort) Sorts a collection of 11 elements in descending order using branchless min/max swap.
Sort12Ascending<T>(T, Comparison<T>) Sorts a collection of 12 elements in ascending order using the specified System.Comparison<>.
Sort12Ascending<T>(T) Sorts a collection of 12 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort12AscendingBranchless(byte) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12AscendingBranchless(int) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12AscendingBranchless(sbyte) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12AscendingBranchless(short) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12AscendingBranchless(uint) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12AscendingBranchless(ushort) Sorts a collection of 12 elements in ascending order using branchless min/max swap.
Sort12Descending<T>(T, Comparison<T>) Sorts a collection of 12 elements in descending order using the specified System.Comparison<>.
Sort12Descending<T>(T) Sorts a collection of 12 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort12DescendingBranchless(byte) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort12DescendingBranchless(int) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort12DescendingBranchless(sbyte) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort12DescendingBranchless(short) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort12DescendingBranchless(uint) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort12DescendingBranchless(ushort) Sorts a collection of 12 elements in descending order using branchless min/max swap.
Sort13Ascending<T>(T, Comparison<T>) Sorts a collection of 13 elements in ascending order using the specified System.Comparison<>.
Sort13Ascending<T>(T) Sorts a collection of 13 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort13AscendingBranchless(byte) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13AscendingBranchless(int) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13AscendingBranchless(sbyte) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13AscendingBranchless(short) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13AscendingBranchless(uint) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13AscendingBranchless(ushort) Sorts a collection of 13 elements in ascending order using branchless min/max swap.
Sort13Descending<T>(T, Comparison<T>) Sorts a collection of 13 elements in descending order using the specified System.Comparison<>.
Sort13Descending<T>(T) Sorts a collection of 13 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort13DescendingBranchless(byte) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort13DescendingBranchless(int) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort13DescendingBranchless(sbyte) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort13DescendingBranchless(short) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort13DescendingBranchless(uint) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort13DescendingBranchless(ushort) Sorts a collection of 13 elements in descending order using branchless min/max swap.
Sort14Ascending<T>(T, Comparison<T>) Sorts a collection of 14 elements in ascending order using the specified System.Comparison<>.
Sort14Ascending<T>(T) Sorts a collection of 14 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort14AscendingBranchless(byte) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14AscendingBranchless(int) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14AscendingBranchless(sbyte) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14AscendingBranchless(short) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14AscendingBranchless(uint) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14AscendingBranchless(ushort) Sorts a collection of 14 elements in ascending order using branchless min/max swap.
Sort14Descending<T>(T, Comparison<T>) Sorts a collection of 14 elements in descending order using the specified System.Comparison<>.
Sort14Descending<T>(T) Sorts a collection of 14 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort14DescendingBranchless(byte) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort14DescendingBranchless(int) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort14DescendingBranchless(sbyte) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort14DescendingBranchless(short) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort14DescendingBranchless(uint) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort14DescendingBranchless(ushort) Sorts a collection of 14 elements in descending order using branchless min/max swap.
Sort15Ascending<T>(T, Comparison<T>) Sorts a collection of 15 elements in ascending order using the specified System.Comparison<>.
Sort15Ascending<T>(T) Sorts a collection of 15 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort15AscendingBranchless(byte) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15AscendingBranchless(int) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15AscendingBranchless(sbyte) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15AscendingBranchless(short) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15AscendingBranchless(uint) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15AscendingBranchless(ushort) Sorts a collection of 15 elements in ascending order using branchless min/max swap.
Sort15Descending<T>(T, Comparison<T>) Sorts a collection of 15 elements in descending order using the specified System.Comparison<>.
Sort15Descending<T>(T) Sorts a collection of 15 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort15DescendingBranchless(byte) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort15DescendingBranchless(int) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort15DescendingBranchless(sbyte) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort15DescendingBranchless(short) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort15DescendingBranchless(uint) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort15DescendingBranchless(ushort) Sorts a collection of 15 elements in descending order using branchless min/max swap.
Sort16Ascending<T>(T, Comparison<T>) Sorts a collection of 16 elements in ascending order using the specified System.Comparison<>.
Sort16Ascending<T>(T) Sorts a collection of 16 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort16AscendingBranchless(byte) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16AscendingBranchless(int) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16AscendingBranchless(sbyte) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16AscendingBranchless(short) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16AscendingBranchless(uint) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16AscendingBranchless(ushort) Sorts a collection of 16 elements in ascending order using branchless min/max swap.
Sort16Descending<T>(T, Comparison<T>) Sorts a collection of 16 elements in descending order using the specified System.Comparison<>.
Sort16Descending<T>(T) Sorts a collection of 16 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort16DescendingBranchless(byte) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort16DescendingBranchless(int) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort16DescendingBranchless(sbyte) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort16DescendingBranchless(short) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort16DescendingBranchless(uint) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort16DescendingBranchless(ushort) Sorts a collection of 16 elements in descending order using branchless min/max swap.
Sort9Ascending<T>(T, Comparison<T>) Sorts a collection of 9 elements in ascending order using the specified System.Comparison<>.
Sort9Ascending<T>(T) Sorts a collection of 9 elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
Sort9AscendingBranchless(byte) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9AscendingBranchless(int) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9AscendingBranchless(sbyte) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9AscendingBranchless(short) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9AscendingBranchless(uint) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9AscendingBranchless(ushort) Sorts a collection of 9 elements in ascending order using branchless min/max swap.
Sort9Descending<T>(T, Comparison<T>) Sorts a collection of 9 elements in descending order using the specified System.Comparison<>.
Sort9Descending<T>(T) Sorts a collection of 9 elements in descending order using the System.IComparable<> generic
interface implementation of each element.
Sort9DescendingBranchless(byte) Sorts a collection of 9 elements in descending order using branchless min/max swap.
Sort9DescendingBranchless(int) Sorts a collection of 9 elements in descending order using branchless min/max swap.
Sort9DescendingBranchless(sbyte) Sorts a collection of 9 elements in descending order using branchless min/max swap.
Sort9DescendingBranchless(short) Sorts a collection of 9 elements in descending order using branchless min/max swap.
Sort9DescendingBranchless(uint) Sorts a collection of 9 elements in descending order using branchless min/max swap.
Sort9DescendingBranchless(ushort) Sorts a collection of 9 elements in descending order using branchless min/max swap.
SortAscending<T>(T, int, Comparison<T>) Sorts a collection of specified number of elements in ascending order using the specified System.Comparison<>.
SortAscending<T>(T, int) Sorts a collection of specified number of elements in ascending order using the System.IComparable<> generic
interface implementation of each element.
SortAscendingBranchless(byte, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortAscendingBranchless(int, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortAscendingBranchless(sbyte, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortAscendingBranchless(short, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortAscendingBranchless(uint, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortAscendingBranchless(ushort, int) Sorts a collection of specified number of elements in ascending order using branchless min/max swap.
SortDescending<T>(T, int, Comparison<T>) Sorts a collection of specified number of elements in descending order using the specified System.Comparison<>.
SortDescending<T>(T, int) Sorts a collection of specified number of elements in descending order using the System.IComparable<> generic
interface implementation of each element.
SortDescendingBranchless(byte, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.
SortDescendingBranchless(int, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.
SortDescendingBranchless(sbyte, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.
SortDescendingBranchless(short, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.
SortDescendingBranchless(uint, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.
SortDescendingBranchless(ushort, int) Sorts a collection of specified number of elements in descending order using branchless min/max swap.