packages feed

hierarchical-clustering 0.4.4 → 0.4.5

raw patch · 4 files changed

+16/−21 lines, 4 filesdep ~arraydep ~basedep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: array, base, containers, hspec

API changes (from Hackage documentation)

Files

hierarchical-clustering.cabal view
@@ -1,5 +1,5 @@ Name:                hierarchical-clustering-Version:             0.4.4+Version:             0.4.5 Synopsis:            Fast algorithms for single, average/UPGMA and complete linkage clustering. License:             BSD3 License-file:        LICENSE@@ -26,10 +26,6 @@   @Data.Clustering.Hierarchical@ automatically chooses the best   implementation we have.   .-  Changes in version 0.4.4:-  .-  * Remove most upper bounds.-  .   Changes in version 0.4:   .   * Specialize the distance type to Double for efficiency reasons.@@ -79,7 +75,7 @@  Source-repository head   type: darcs-  location: http://patch-tag.com/r/felipe/hierarchical-clustering+  location: https://github.com/meteficha/hierarchical-clustering   Library@@ -91,8 +87,8 @@     Data.Clustering.Hierarchical.Internal.Types   Build-depends:       base       == 4.*-    , array      >= 0.3-    , containers >= 0.3+    , array      >= 0.3 && < 0.6+    , containers >= 0.3 && < 0.6   GHC-options: -Wall  Test-suite runtests@@ -102,7 +98,7 @@   Build-depends:       base       == 4.* -    , hspec      >= 0.9+    , hspec      >= 2.1     , HUnit      >= 1.2     , QuickCheck >= 2.4 
src/Data/Clustering/Hierarchical/Internal/DistanceMatrix.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE BangPatterns, FlexibleContexts #-}  module Data.Clustering.Hierarchical.Internal.DistanceMatrix     (singleLinkage
src/Data/Clustering/Hierarchical/Internal/Optimal.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns #-}+{-# LANGUAGE BangPatterns, FlexibleContexts #-}  -- | Implementations that are optimal in space and time. module Data.Clustering.Hierarchical.Internal.Optimal
tests/runtests.hs view
@@ -8,12 +8,11 @@ import Text.Show.Functions ()  -- from hspec-import Test.Hspec.Monadic (hspecX, describe, it, pending, Specs)-import Test.Hspec.HUnit ()+import Test.Hspec (hspec, describe, it, pendingWith, shouldBe, Spec) import Test.Hspec.QuickCheck (prop)  -- from HUnit-import Test.HUnit ((~?=), Assertion, assertFailure)+import Test.HUnit (Assertion, assertFailure)  -- from QuickCheck import Test.QuickCheck (Property, Arbitrary(..), Gen, forAll)@@ -25,11 +24,11 @@   main :: IO ()-main = hspecX $ do+main = hspec $ do          test_cutAt          test_dendrogram -test_cutAt :: Specs+test_cutAt :: Spec test_cutAt =     describe "cutAt" $ do       let dendro      :: Dendrogram Char@@ -43,7 +42,7 @@        let testFor threshold expected =               it (printf "works for 'dendro' with threshold %0.1f" threshold) $-                 dendro `cutAt` threshold ~?= expected+                 dendro `cutAt` threshold `shouldBe` expected        testFor 0.9 [dendro]       testFor 0.8 [dendro]@@ -53,7 +52,7 @@       testFor 0.2 [d_0_5_left, d_0_5_right, d_0_8_right]       testFor 0.1 [d_0_2_left, d_0_2_right, d_0_5_right, d_0_8_right] -test_dendrogram :: Specs+test_dendrogram :: Spec test_dendrogram = do     describe "Optimal's singleLinkage" $ do       basicDendrogramTests O.singleLinkage@@ -88,11 +87,11 @@                        f1 ps euclideanDist ==== f2 ps euclideanDist       prop "agree on singleLinkage"   $ test O.singleLinkage DM.singleLinkage       it "agree on completeLinkage" $-         pending "This doesn't work because CLINK doesn't \-                 \always give the best complete linkage."+         pendingWith "This doesn't work because CLINK doesn't \+                     \always give the best complete linkage."  -basicDendrogramTests :: (forall a. [a] -> (a -> a -> Distance) -> Dendrogram a) -> Specs+basicDendrogramTests :: (forall a. [a] -> (a -> a -> Distance) -> Dendrogram a) -> Spec basicDendrogramTests f = do   it "fails for an empty input" $      assertErrors (f [] (\_ _ -> zero))