linear-grammar: A simple grammar for building linear equations and inclusive inequalities.
This version is deprecated.
This library provides some simple tools for building abstract syntax trees, representing linear equations and (inclusive) inequalities. As an example:
12x + 3y - 4z + 12 <= 43x - 7b + 8q
Would look like...
f = (12 :: Double) .*. EVar "x" .+. (3 :: Double) .*. EVar "y" .+. (-4 :: Double) .*. EVar "z" .+. ELit 12 .<=. (43 :: Double) .*. EVar "x" .+. (-7 :: Double) .*. EVar "b" .+. (8 :: Double) .*. EVar "q"
I've added some overloading functionality, to help ease the verbosity of the
above statements - an IsString
instance, and some other utilities. To pack
the equation into standard form,
use the sandardForm
function:
stdF = standardForm f
Downloads
- linear-grammar-0.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.0.0.1, 0.0.0.2, 0.0.0.3, 0.0.0.4, 0.0.0.5, 0.0.0.6, 0.0.0.7, 0.0.1, 0.0.1.1, 0.0.1.2, 0.0.1.3, 0.0.1.4, 0.0.1.5, 0.0.1.6, 0.0.2, 0.0.2.1 (info) |
---|---|
Dependencies | base (>=4.6 && <5), containers, QuickCheck [details] |
License | BSD-3-Clause |
Author | Athan Clark <athan.clark@gmail.com> |
Maintainer | Athan Clark <athan.clark@gmail.com> |
Category | Math, Algebra |
Source repo | head: git clone https://github.com/athanclark/linear-grammar.git |
Uploaded | by athanclark at 2015-06-13T14:23:32Z |
Distributions | NixOS:0.0.2.1 |
Reverse Dependencies | 1 direct, 1 indirect [details] |
Downloads | 7074 total (4 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |