binary-search: Binary and exponential searches
This package provides varieties of binary search functions. c.f. Numeric.Search for the examples.
These search function can search for pure and monadic predicates, of type:
pred :: Eq b => a -> b pred :: (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
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 provides the generic search combinator, to search for pure and monadic predicates.
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.
[Index] [Quick Jump]
- binary-search-2.0.0.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
For package maintainers and hackage trustees
|Versions [RSS]||0.0, 0.1, 0.9, 1.0, 184.108.40.206, 220.127.116.11, 18.104.22.168, 2.0.0|
|Dependencies||base (>=4.5 && <5), containers (>=0.4), transformers [details]|
|Author||supercede <firstname.lastname@example.org>, Ross Paterson <email@example.com>, Takayuki Muranushi <firstname.lastname@example.org>|
|Source repo||head: git clone https://github.com/riskbook/binary-search|
|Uploaded||by Jappie at 2021-02-22T19:01:02Z|
|Distributions||LTSHaskell:2.0.0, NixOS:2.0.0, Stackage:2.0.0|
|Reverse Dependencies||4 direct, 6 indirect [details]|
|Downloads||9999 total (47 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
|Status||Docs available [build log]
Last success reported on 2021-02-22 [all 1 reports]