Skip to main content

AbstractMergeBasedSorter

Short summary

Abstract Sorter for merge based sort methods. Provides a default implementation for an indexed merge function and a method to efficient copy elements.

Caution: Due to the characteristics of a merge, a merge must be performed atomically. As a merge of two lists l1 and l2 can take up to l1.size+l2.size-1 compares. That implies that at the last cycle of the merge, an atomic operation that requires up to list.size-1 compares must be performed. Therefore the maxCycleCompares may be exceeded and set the maxCycleCompares to a value smaller than list.size-1 may not have the desired effect.

AccessAbstractFinalExtendsImplements
INTERNALYesNoAbstractArrayListSorter-

UML Diagram

Methods

merge

Function that sorts specified parts using a merge mechanism.

Code

Declaration

FUNCTION_BLOCK INTERNAL ABSTRACT AbstractMergeBasedSorter EXTENDS AbstractArrayListSorter