spaceprobe 0.2.0 → 0.3.0
raw patch · 4 files changed
+18/−23 lines, 4 filesdep ~QuickCheckdep ~clockdep ~criterion
Dependency ranges changed: QuickCheck, clock, criterion, erf, mtl, spaceprobe, test-framework, test-framework-quickcheck2
Files
- Control/SpaceProbe/Internal/Optimize.hs +2/−2
- Control/SpaceProbe/Internal/Probe.hs +1/−1
- spaceprobe.cabal +15/−15
- tests/Tests.hs +0/−5
Control/SpaceProbe/Internal/Optimize.hs view
@@ -64,8 +64,8 @@ ucb n_total l u (SearchNode _ mu m n k k') | n == 0 = -1.0 / 0 | k' == k = 1- | otherwise = negate $ normalize (0.8 * mu + 0.2 * m) + - sqrt (2 * log (i2f n_total) / i2f n)+ | otherwise = negate $ normalize (0.3 * mu + 0.7 * m) + + sqrt (0.5 * log (i2f n_total) / i2f n) where normalize x | u == l = 0.5 | otherwise = (x - l) / (u - l)
Control/SpaceProbe/Internal/Probe.hs view
@@ -23,7 +23,7 @@ (<*>), (<|>), (<$>))-import Data.Number.Erf (Erf, InvErf, invnormcdf, normcdf)+import Data.Number.Erf (InvErf, invnormcdf, normcdf) import Data.Tree(Forest, Tree(..)) -- | The main data structure for this module; it describes
spaceprobe.cabal view
@@ -1,5 +1,5 @@ name: spaceprobe-version: 0.2.0+version: 0.3.0 license: BSD3 license-file: LICENSE category: Optimization@@ -22,11 +22,11 @@ tests/*.hs library- build-depends: base >= 2 && <5,- containers,- clock,- erf,- mtl+ build-depends: base >=2 && <5,+ containers -any,+ clock >=0.4.2.0,+ erf >=2.0.0.0,+ mtl >=2.0.1.1 exposed-modules: Control.SpaceProbe Control.SpaceProbe.Internal.Probe Control.SpaceProbe.Internal.Optimize@@ -42,13 +42,13 @@ build-depends: base >=2 && <5,- QuickCheck >= 2.7,- test-framework >= 0.8.0.2,- test-framework-quickcheck2 >= 0.3.0.3,- clock,- erf,- containers,- mtl+ QuickCheck >=1.0,+ test-framework >=0.1,+ test-framework-quickcheck2 >=0.2.1,+ clock >=0.4.2.0,+ erf >=2.0.0.0,+ containers -any,+ mtl >=2.0.1.1 benchmark benchmarks type: exitcode-stdio-1.0@@ -59,8 +59,8 @@ build-depends: base >=2 && <5,- criterion,- spaceprobe+ criterion >=0.1,+ spaceprobe >=0.0.0 source-repository head
tests/Tests.hs view
@@ -124,10 +124,6 @@ maximize (const 0) $ exponentialInt mu -prop_UniformIntExhaustive :: Int -> Positive Int -> Property-prop_UniformIntExhaustive a (Positive x) = - sort (map fst . maximize (const 0) $ uniformInt a b) === [a..b-1]- where b = a + x prop_UniformBounds :: Float -> Positive Float -> Positive Int -> Bool prop_UniformBounds a (Positive x) (Positive k) = @@ -159,7 +155,6 @@ tests :: [Test] tests = [testProperty "prop_ValidFloat" prop_ValidFloat, testProperty "prop_ValidInt" prop_ValidInt,- testProperty "prop_UniformIntExhaustive" prop_UniformIntExhaustive, testProperty "prop_UniformBounds" prop_UniformBounds, testProperty "prop_ExponentialBounds" prop_ExponentialBounds, testProperty "prop_LowestYet" prop_LowestYet,