sort

package
v0.0.0-...-e3578a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

package sort provides functions for sorting and finding the median of float64 slices without the overhead of Go's interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Median

func Median(xs []float64, buf ...[]float64) float64

func NthLargest

func NthLargest(xs []float64, n int, buf ...[]float64) float64

Remember that this function is 1-indexed.

func Percentile

func Percentile(xs []float64, p float64, buf ...[]float64) float64

func Quick

func Quick(xs []float64) []float64

Quick sorts an array in place via quicksort (and returns the result for convenience.)

func Reverse

func Reverse(xs []float64) []float64

Reverse reverses a slice in place (and returns it for convenience).

func Shell

func Shell(xs []float64) []float64

Shell sorts an array in place via Shell's method (and returns the result for convenience).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL