packages feed

bins 0.1.1.0 → 0.1.1.1

raw patch · 3 files changed

+34/−14 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Data.Bin: binView :: (a -> b) -> (b -> a) -> BinView a b
- Data.Bin: linBS :: forall n a. a -> a -> BinSpec n a a
+ Data.Bin: linBS :: forall n a. () => a -> a -> BinSpec n a a

Files

CHANGELOG.md view
@@ -1,5 +1,14 @@ # Changelog +Version 0.1.1.1+---------------++*August 31, 2018*++<https://github.com/mstksg/backprop/releases/tag/v0.1.1.1>++*   Exported *binView*, which was mistakenly hidden.+ Version 0.1.1.0 --------------- 
bins.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 93a048b815dea1b0e463e995493b1a2cb36ccbd9cf1e2eb977d48e689f194e5d+-- hash: d3a0afd067f13ba2e886ad66828fdb40215329e79a93de097003e945e182473d  name:           bins-version:        0.1.1.0+version:        0.1.1.1 synopsis:       Aggregate continuous values into discrete bins description:    Please see the README on GitHub at <https://github.com/mstksg/bins#readme> category:       Math
src/Data/Bin.hs view
@@ -34,8 +34,10 @@  module Data.Bin (   -- * Specifying the binning-    BinView, linView, logView, gaussView-  , BinSpec(..), linBS, logBS, gaussBS+    BinSpec(..), linBS, logBS, gaussBS+  -- ** 'BinView'+  , BinView, binView, linView, logView, gaussView+  -- ** Inspecting 'BinSpec'   , binSpecIntervals   -- * Creating and manipulating bins   , Bin, Binner, withBinner, fromFin@@ -70,7 +72,7 @@ -- | A bidirectional "view" to transform the data type before binning. -- -- See 'linView' for a linear binning, and 'logView' for a logarithmic--- binning.+-- binning.  You can construct your own custom transformer using 'binView'. -- -- This type is essentially 'Iso' from the /lens/ library, and any 'Iso'' -- from lens can be used here.  However, it is important that all of these@@ -135,7 +137,11 @@ -- @ -- 'linBS' @5 0 10 -- @-linBS :: forall n a. a -> a -> BinSpec n a a+linBS+    :: forall n a. ()+    => a                            -- ^ Lower bound+    -> a                            -- ^ Upper bound+    -> BinSpec n a a linBS mn mx = BS mn mx linView  -- | Convenient constructor for a 'BinSpec' for a logarithmic scaling.@@ -145,7 +151,11 @@ -- @ -- 'logBS' @5 0 10 -- @-logBS :: forall n a. Floating a => a -> a -> BinSpec n a a+logBS+    :: forall n a. Floating a+    => a                            -- ^ Lower bound+    -> a                            -- ^ Upper bound+    -> BinSpec n a a logBS mn mx = BS mn mx logView  -- | Convenient constructor for a 'BinSpec' for a gaussian scaling.  Uses@@ -154,13 +164,15 @@ -- Meant to be used with type application syntax: -- -- @--- 'gaussBS' @5 0 10+-- 'gaussBS' @5 3 0 10 -- @+--+-- indicates that you want 5 bins. gaussBS     :: forall n a. RealFrac a-    => a-    -> a-    -> a+    => a                            -- ^ Standard Deviation+    -> a                            -- ^ Lower bound+    -> a                            -- ^ Upper bound     -> BinSpec n a Double gaussBS σ mn mx = BS mn mx (gaussView ((mn + mx)/2) σ) @@ -279,8 +291,7 @@ type Binner s n a = a -> Bin s n  -- | With a 'BinSpec', give a "binning function" that you can use to create--- bins within a continuation.  The binning function is meant to be used--- with TypeApplications to specify how many bins to use:+-- bins within a continuation. -- -- @ -- 'withBinner' myBinSpec $ \toBin ->@@ -441,7 +452,7 @@ -- -- To be able to "unify" two 'Bin's inside a 'SomeBin', use 'sameBinSpec' -- to verify that the two 'SomeBin's were created with the same 'BinSpec'.-data SomeBin a n = forall s b. (Fractional b, Reifies s (BinSpec n a b)) +data SomeBin a n = forall s b. (Fractional b, Reifies s (BinSpec n a b))     => SomeBin { getSomeBin :: Bin s n }  deriving instance (KnownNat n, Show a) => Show (SomeBin a n)