invert: Automatically generate a function’s inverse
This library deals with computing a function’s inverse. This is, of course, not possible in general, so the applicability of this library comes with some caveats:
The function’s domain must be enumerable, and preferably rather small. We provide a few suggestions and utilities for how to enumerate the domain.
The function’s codomain must belong to the
Eq
class. AnOrd
orHashable
instance is also nice, to accommodate a data structure for efficient lookups.The functions for inverting injections, surjections, and bijections require some care to use correctly, because the library does not verify these properties.
The main purpose of this library is to provide documentation and convenience. It does not contain a great quantity of code, so a user hesitant to incur a dependency on the package might well choose only to read and borrow its techniques.
Downloads
- invert-1.0.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
- No Candidates
Versions [RSS] | 1.0, 1.0.0.1, 1.0.0.2, 1.0.0.3, 1.0.0.4 |
---|---|
Dependencies | base (>=4.12 && <4.16), containers (>=0.6 && <0.7), generic-deriving (>=1.14 && <1.15), hashable (>=1.2.7 && <1.4), unordered-containers (>=0.2.9 && <0.3), vector (>=0.12 && <0.13) [details] |
License | Apache-2.0 |
Author | Chris Martin |
Maintainer | Chris Martin, Julie Moronuki |
Revised | Revision 3 made by chris_martin at 2021-06-02T04:44:44Z |
Category | Functions |
Home page | https://github.com/typeclasses/invert |
Bug tracker | https://github.com/typeclasses/invert/issues |
Uploaded | by chris_martin at 2021-02-09T21:44:10Z |
Distributions | LTSHaskell:1.0.0.4, NixOS:1.0.0.4 |
Downloads | 642 total (15 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2021-02-09 [all 1 reports] |