Sorting

com.phasmidsoftware.sort.Sorting
object Sorting

Object providing in-place sorting capability for arrays.

Sorting.sort() uses quickSort() by default (in-place, not stable, generally fastest but might hit bad cases where it's quadratic. Also provides mergeSort() (in-place, stable, uses extra memory, still pretty fast) and insertionSort(), which is slow except for small arrays.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Sorting.type

Members list

Value members

Concrete methods

final def insertionSort[A : Ordering : ClassTag](data: Array[A]): Unit
final def mergeSort[A : Ordering : ClassTag](data: Array[A]): Unit
final def quickSort[A : Ordering : ClassTag](data: Array[A]): Unit
final def sort[A : Ordering : ClassTag](data: Array[A]): Unit