Package PamUtils
Class PamSort
java.lang.Object
PamUtils.PamSort
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
oneIterationBackSort
(Vector anyList) Function for sorting when a single data unit has been added to the end of a list and needs to be moved to it's correct position.
-
Constructor Details
-
PamSort
public PamSort()
-
-
Method Details
-
oneIterationBackSort
Function for sorting when a single data unit has been added to the end of a list and needs to be moved to it's correct position.
This requires a maximum of a single pass through the data and can exit as soon as the correct position is found. this has only been implemented for Lists that implement RandomAccess, for other (Linked) lists, this would be very slow, so for those lists, it's reverting to a full sort.
Primarily, this was written to more efficiently add new data units to super detections.- Parameters:
anyList
- list with a single new data at it's end that must be sorted into position. Elements must implement the Comparable interface.
-