packages feed

complex-integrate 0.1 → 1.0.0

raw patch · 3 files changed

+33/−44 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/Complex/Integrate.hs view
@@ -8,10 +8,6 @@ -- We will work with complex numbers import Data.Complex --- | Get step between <a> and <b> given number <n> of steps-getQuantizer :: (Fractional a) => a -> a -> Integer -> a-getQuantizer a b n = (b - a) / fromInteger n- -- | Integration of complex function using Simpson's rule integrate :: (Fractional v) =>      (v -> v)   -- ^ Function to be integrated@@ -25,4 +21,9 @@            h = getQuantizer a b n            f_o = sum $ map (f . (+ a) . (* h) . fromInteger) [nn | nn <- [1..(n-1)], odd nn]            f_e = sum $ map (f . (+ a) . (* h) . fromInteger) [nn | nn <- [2..(n-2)], even nn]+-- Yes, I know that function and data in maps should be refactored out, but every time I'm doing this, I am became stunned, because the integrate itself is losing clarity. ++-- | Get step between <a> and <b> given number <n> of steps+getQuantizer :: (Fractional a) => a -> a -> Integer -> a+getQuantizer a b n = (b - a) / fromInteger n
+ README.md view
@@ -0,0 +1,19 @@+complex-integrate+=================++Small and simple library for integration of complex functions.+Integrates functions along straight lines. Compatible with real-valued functions.+Uses Simpson's method.++As of Oct, 2011 I could not find any haskell package which could provide me with something so simple as this.++*cabalized*: install with++    $ cabal install complex-integrate++Provides you with only a single function:++    integrate f n a b++which integrates `f` along a line between points `a` and `b` while dividing this line in `n` segments, providing accuracy.+
complex-integrate.cabal view
@@ -1,62 +1,31 @@--- complex-integrate.cabal auto-generated by cabal init. For--- additional options, see--- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.--- The name of the package. Name:                complex-integrate---- The package version. See the Haskell package versioning policy--- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for--- standards guiding when and how versions should be incremented.-Version:             0.1---- A short (one-line) description of the package.+Version:             1.0.0+Cabal-version:       >= 1.6 Synopsis:            A simple integration function to integrate a complex-valued complex functions  --- A longer description of the package. Description:   Small and simple library for integration of complex functions.   Integrates functions along straight lines. Compatible with real-valued functions.   Uses Simpson's method. ---- The license under which the package is released. License:             PublicDomain---- The file containing the license text. License-file:        LICENSE --- The package author(s). Author:              Mark Safronov a.k.a. hijarian---- An email address to which users can send suggestions, bug reports,--- and patches. Maintainer:          hijarian@gmail.com --- A copyright notice.--- Copyright:           - Category:            Math  Build-type:          Simple --- Extra files to be distributed with the package, such as examples or--- a README.--- Extra-source-files:  ---- Constraint on the version of Cabal needed to build this package.-Cabal-version:       >=1.2+Homepage: https://github.com/hijarian/complex-integrate +Extra-source-files: README.md -Library-  -- Modules exported by the library.+Library    Exposed-modules:     Data.Complex.Integrate-  -  -- Packages needed in order to build this package.   Build-Depends: base >= 4.3.1.0 && < 5-  -  -- Modules not exported by this package.-  -- Other-modules:       -  -  -- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.-  -- Build-tools:         -  ++Source-repository head +  type: git +  location: https://github.com/hijarian/complex-integrate