simple-genetic-algorithm 0.1.0.0 → 0.1.0.1
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~base
Dependency ranges changed: base
Files
- simple-genetic-algorithm.cabal +3/−3
- src/GA/Simple.hs +3/−3
simple-genetic-algorithm.cabal view
@@ -2,7 +2,7 @@ -- further documentation, see http://haskell.org/cabal/users-guide/ name: simple-genetic-algorithm-version: 0.1.0.0+version: 0.1.0.1 synopsis: Simple parallel genetic algorithm implementation description: Simple parallel genetic algorithm implementation homepage: http://eax.me/haskell-genetic-algorithm/@@ -23,7 +23,7 @@ library exposed-modules: GA.Simple ghc-options: -O2 -Wall -fno-warn-missing-signatures- build-depends: base >=4.6 && < 4.7,+ build-depends: base >=4.5 && < 4.7, random >= 1.0 && < 1.1, parallel >= 3.2 && < 3.3 hs-source-dirs: src@@ -32,7 +32,7 @@ executable ga-sin-example ghc-options: -O2 -Wall -fno-warn-missing-signatures -threaded -rtsopts main-is: MainSin.hs- build-depends: base >= 4.6 && < 4.7,+ build-depends: base >= 4.5 && < 4.7, random >= 1.0 && < 1.1, deepseq >= 1.3 && < 1.4, parallel >= 3.2 && < 3.3
src/GA/Simple.hs view
@@ -11,7 +11,7 @@ import qualified Data.List as L import Control.Parallel.Strategies --- | Chromosome representation+-- | Chromosome interface class NFData a => Chromosome a where -- | Crossover function crossover :: RandomGen g => g -> a -> a -> ([a],g)@@ -25,7 +25,7 @@ => g -- ^ Random number generator -> Int -- ^ Population size -> Double -- ^ Mutation probability [0, 1]- -> (g -> (a, g)) -- ^ Random chromosome generator (hint: use closures)+ -> (g -> (a, g)) -- ^ Random chromosome generator (hint: use currying or closures) -> (a -> Int -> Bool) -- ^ Stopping criteria, 1st arg - best chromosome, 2nd arg - generation number -> a -- ^ Best chromosome runGA gen ps mp rnd stopf =@@ -44,7 +44,7 @@ runGAIO :: Chromosome a => Int -- ^ Population size -> Double -- ^ Mutation probability [0, 1]- -> (StdGen -> (a, StdGen)) -- ^ Random chromosome generator (hint: use closures)+ -> (StdGen -> (a, StdGen)) -- ^ Random chromosome generator (hint: use currying or closures) -> (a -> Int -> IO Bool) -- ^ Stopping criteria, 1st arg - best chromosome, 2nd arg - generation number -> IO a -- ^ Best chromosome runGAIO ps mp rnd stopf = do