Namespace FastBWT
public class BWT_Medium_Sorter
BWT Sorter for normal-sized blocks.
Constructors
public BWT_Small_Sorter(int BlockSize)
Create new BWT_Small_Sorter that supports blocks of up to BlockSize length.
Properties
public List<StatisticStep> Statistics { get; private set; }
Statistics of the last sorting. This collection will be overwritten in Sort methods.
Methods
public abstract void GenerateVector(byte[] SourceBlock, ICollection Index, long DataSize = 0)
Generate the sorting vector for source bytes. The actual type of Array shall be uint[].
public abstract long Sort(byte[] SourceBlock, byte[] TargetBlock, long DataSize = 0)
Sort SourceBlock to TargetBlock. This method internally generates the sorting vector and fills the TargetBlock.
Remarks
This sorter supports blocks of up to about 2G and is designed for "normal-sized" blocks. Consider to use this sorter if the size of your blocks is 200k - 50M.
It uses uint[] as a type for sorting vector. Big regions in statistics are 64k or longer.
This sorter uses the same sorting algorithm as BWT_Small_Sorter but with some optimizations:
- Initialization is multithreaded and uses 2-bytes bucket sorting reducing the first iteration. For larger blocks this may spare up to 20% of time.
- Scheduling of big regions is more aggressive. Each worker sorts always the largest region first. This reduces the penalty for sorting of very large region.
- Region shall be much larger to be considered as a big one.
- Small regions are sorted in larger batches to reduce synchronization.