quickselect-0.1.0.0

Copyright(c) Donnacha Oisín Kidney 2018
LicenseMIT
Maintainermail@doisinkidney.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Data.Select.Optimal

Description

This module provides optimal selection functions for small, fixed-size inputs. Each function returns the (0-based) index of the argument which is the nth item, according to the supplied relation.

Synopsis

Documentation

select2 :: (a -> a -> Bool) -> Int -> a -> a -> Int Source #

Select from 2 items.

select3 :: (a -> a -> Bool) -> Int -> a -> a -> a -> Int Source #

Select from 3 items.

select4 :: (a -> a -> Bool) -> Int -> a -> a -> a -> a -> Int Source #

Select from 4 items.

select5 :: (a -> a -> Bool) -> Int -> a -> a -> a -> a -> a -> Int Source #

Select from 5 items.