binary-search: Binary and exponential searches
Introduction
This package provides varieties of binary search functions.
These search function can search for predicates of the type
pred :: (Integral a, Eq b) => a -> b
, or monadic predicates
pred :: (Integral a, Eq b, Monad m) => a -> m b
.
The predicates must satisfy that the domain range for any codomain value
is continuous; that is, ∀x≦y≦z. pred x == pred z ⇒ pred y == pred x
.
For example, we can address the problem of finding the boundary of an upward-closed set of integers, using a combination of exponential and binary searches.
Variants are provided
for searching within bounded and unbounded intervals of
both Integer
and bounded integral types.
The package was created by Ross Paterson, and extended by Takayuki Muranushi, to be used together with SMT solvers.
The Module Structure
Numeric.Search.Combinator.Monadic provides the most generic combinators. Numeric.Search.Combinator.Pure provides the pure version of them.
Numeric.Search exports both pure and monadic version.
Numeric.Search.Bounded , Numeric.Search.Integer , Numeric.Search.Range provides the various specialized searchers, which means less number of function arguments, and easier to use.
Modules
[Index]
Downloads
- binary-search-0.9.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.0, 0.1, 0.9, 1.0, 1.0.0.1, 1.0.0.2, 1.0.0.3, 2.0.0 |
---|---|
Dependencies | base (>=4.8 && <5), containers (>=0.4 && <0.6) [details] |
License | BSD-3-Clause |
Author | Ross Paterson <ross@soi.city.ac.uk>, Takayuki Muranushi <muranushi@gmail.com> |
Maintainer | Takayuki Muranushi <muranushi@gmail.com> |
Revised | Revision 1 made by HerbertValerioRiedel at 2016-11-27T16:04:02Z |
Category | Algorithms |
Source repo | head: git clone https://github.com/nushio3/binary-search |
Uploaded | by TakayukiMuranushi at 2016-01-18T16:09:14Z |
Distributions | LTSHaskell:2.0.0, NixOS:2.0.0, Stackage:2.0.0 |
Reverse Dependencies | 4 direct, 8 indirect [details] |
Downloads | 10827 total (9 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2016-01-19 [all 1 reports] |