-- Initial lagrangian.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ -- The name of the package. name: lagrangian -- The package version. See the Haskell package versioning policy (PVP) -- for standards guiding when and how versions should be incremented. -- http://www.haskell.org/haskellwiki/Package_versioning_policy -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change version: 0.5.0.0 -- A short (one-line) description of the package. synopsis: Solve Lagrange multiplier problems -- A longer description of the package. description: Numerically solve convex Lagrange multiplier problems with conjugate gradient descent. . For some background on the method of Lagrange multipliers checkout the wikipedia page . Here is an example from the Wikipedia page on Lagrange multipliers Maximize f(x, y) = x + y, subject to the constraint x^2 + y^2 = 1 . @ \> maximize 0.00001 (\\[x, y] -> x + y) [(\\[x, y] -> x^2 + y^2) \<=\> 1] 2 Right ([0.707,0.707], [-0.707]) @ . For more information look here: . For example, to find the maximum entropy with the constraint that the probabilities sum to one. . @ \> maximize 0.00001 (negate . sum . map (\\x -> x * log x)) [sum \<=\> 1] 3 Right ([0.33, 0.33, 0.33], [-0.09]) @ . The first elements of the result pair are the arguments for the objective function at the maximum. The second elements are the Lagrange multipliers. . -- URL for the project homepage or repository. homepage: http://github.com/jfischoff/lagrangian -- The license under which the package is released. license: BSD3 -- The file containing the license text. license-file: LICENSE -- The package author(s). author: Jonathan Fischoff -- An email address to which users can send suggestions, bug reports, and -- patches. maintainer: jonathangfischoff@gmail.com -- A copyright notice. -- copyright: category: Math build-type: Simple -- Constraint on the version of Cabal needed to build this package. cabal-version: >=1.8 library -- Modules exported by the library. exposed-modules: Numeric.AD.Lagrangian -- Modules included in this library but not exported. other-modules: Numeric.AD.Lagrangian.Internal -- Other library packages from which modules are imported. build-depends: base ==4.6.*, nonlinear-optimization ==0.3.*, vector ==0.10.*, ad ==3.4.*, hmatrix == 0.14.* -- Directories containing source files. hs-source-dirs: src Test-Suite tests Hs-Source-Dirs: src, tests type: exitcode-stdio-1.0 main-is: Main.hs build-depends: base ==4.6.*, nonlinear-optimization ==0.3.*, vector ==0.10.*, ad ==3.4.*, hmatrix == 0.14.*, test-framework ==0.8.*, test-framework-hunit ==0.3.*, test-framework-quickcheck2 ==0.3.*, HUnit == 1.2.*