binary-search: Binary and exponential searches

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Introduction

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 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

Properties

Versions 0.0, 0.1, 0.9, 1.0, 1.0.0.1, 1.0.0.2, 1.0.0.3, 2.0.0, 2.0.0
Change log None available
Dependencies base (>=4.5 && <5), containers (>=0.4), transformers [details]
License BSD-3-Clause
Author supercede <support@supercede.com>, Ross Paterson <ross@soi.city.ac.uk>, Takayuki Muranushi <muranushi@gmail.com>
Maintainer supercede <support@supercede.com>
Category Algorithms
Source repo head: git clone https://github.com/riskbook/binary-search
Uploaded by Jappie at 2021-02-22T19:00:35Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees