Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFloatSorter ¶
func NewFloatSorter[F Float]() zermelo.Sorter[F]
NewFloatSorter creates a new Sorter for float slices that will use radix sort on large slices and reuses buffers. The first sort creates a buffer the same size as the slice being sorted and keeps it for future use. Later sorts may grow this buffer as needed. The FloatSorter returned is not thread safe. Using this sorter can be much faster than repeat calls to SortFloats.
func SortFloats ¶
func SortFloats[F Float](x []F)
SortFloats sorts float slices. If the slice is large enough, radix sort is used by allocating a new buffer.
func SortFloatsBYOB ¶
func SortFloatsBYOB[F Float](x, buffer []F)
SortFloatsBYOB sorts float slices with radix sort using the provided buffer. len(buffer) must be greater or equal to len(x).
Types ¶
Click to show internal directories.
Click to hide internal directories.