úÎ!iÚeþ3      !"#$%&'()*+,-./012(c) Justin Le 2018BSD3 justin@jle.im experimental non-portableNone"#%.014>EHSUVX_kdS%binsA  a n is  s n, except with the  - s hidden. It's useful for returning out of .It has useful 3 and 4 instances.To be able to "unify" two  s inside a , use ( to verify that the two s were created with the same  .bins+The type of a "binning function", given by . See  for information on how to use.binsA  s n is a single bin index out of n6 partitions of the original data set, according to a   represented by s.All s with the same s follow the same  , so you can safely use  .It has useful 3 and 4 instances. Actually has n + 2F partitions, since it also distinguishes values that are outside the   range.binsIData type extending a value with an extra "minimum" and "maximum" value. binsSpecification of binning.A   n a b will bin values of type a into n' bins, according to a scaling in type b.JConstructor is meant to be used with type application syntax to indicate n, like   5 0 10 @ binslower bound of values binsupper bound of values bins binning viewbinsAA bidirectional "view" to transform the data type before binning.See  for a linear binning, and R for a logarithmic binning. You can construct your own custom transformer using .This type is essentially Iso from the lens library, and any Iso'U from lens can be used here. However, it is important that all of these represent  monotonic isomorphisms.bins Construct a # based on "to" and "from" functions6It is important that the "to" and "from" functions be inverses> of each other. Furthermore, both "to" and "from" should be  monotonic.binsLinear binningbinsRLogarithmic binning (smaller bins at lower levels, larger bins at higher levels).binsžBinning based on a Gaussian Distribution. Bins "by standard deviation"; there are more bins the closer to the mean you get, and less bins the farther away.binsConvenient constructor for a   for a linear scaling..Meant to be used with type application syntax:  @5 0 10 binsConvenient constructor for a   for a logarithmic scaling..Meant to be used with type application syntax:  @5 0 10 binsConvenient constructor for a  B for a gaussian scaling. Uses the midpoint as the inferred mean..Meant to be used with type application syntax:  @5 3 0 10 indicates that you want 5 bins.binsChurch-style deconstructor for , analogous to 5, 6, and bool.binsExtract the item from a 0 if it is neither the extra minimum or maximum.binsA more specific version of J that indicates whether or not the value was too high or too low for the   range.binsExtract, potentially, the  index. Will return 7( if the original value was outside the   range.See h for a more specific version, which indicates if the original value was too high or too low. Also see ", which extends the range of the 8! to embed lower or higher values.binsLike /, but return the true "n + 2" slot number of a  , where 9 is "below minimum" and : is "above maximum"binsLike O, but squishes or compresses "below minimum" to "above maximum" bins into the 8N, counting them in the same bin as the minimum and maximum bin, respectively.binsWith a  S, give a "binning function" that you can use to create bins within a continuation. . myBinSpec $ toBin -> show (toBin 2.8523) >Uses a Rank-N continution to ensure that you can only compare s constructed from the same  /binning function.bins>Generate a vector of the boundaries deriving the bins from a  . Can be useful for debugging.binsCExtract the minimum and maximum of the range indicabed by a given .A 7A value indicates that we are outside of the normal range of the  &, so is "unbounded" in that direction.bins6Extract the minimum of the range indicabed by a given .A 7I value means that the original value was below the minimum limit of the  +, so is "unbounded" in the lower direction. bins6Extract the maximum of the range indicabed by a given .A 7I value means that the original value was above the maximum limit of the  +, so is "unbounded" in the upper direction.!bins%Display the interval maintained by a ."bins%Display the interval maintained by a  , if the  contains a ;.#bins+Generate a histogram: given a container of aRs, generate a frequency map of how often values in a given discrete bin occurred. Ãxs :: [Double] xs = [1..100] main :: IO () main = withBinner (logBS @10 5 50) $ toBin -> mapM_ ((b, n) -> putStrLn (displayBinDouble 4 b ++ "t" ++ show n)) . M.toList $ binFreq toBin xs ÿ:(-inf .. 5.0000) 4 [5.0000 .. 6.2946) 2 [6.2946 .. 7.9245) 1 [7.9245 .. 9.9763) 2 [9.9763 .. 12.5594) 3 [12.5594 .. 15.8114) 3 [15.8114 .. 19.9054) 4 [19.9054 .. 25.0594) 6 [25.0594 .. 31.5479) 6 [31.5479 .. 39.7164) 8 [39.7164 .. 50.0000) 10 [50.0000 .. +inf) 51 $bins Construct a ] if you know the bin number you want to specify, or if the bin is over or under the maximum.%bins Construct a 7 if you know the bin number you want to specify. See $J if you want to specify bins that are over or under the maximum, as well.&binsExpand a  containing a 8 to a wider-ranged 8 . Used for 'binsThe inverse of &: "re-pack" a 8 back into a  containing a narrower-ranged 8.(binsVerify that the two reified  B types refer to the same one, allowing you to use functions like < and = on s that you get out of a .*binsŽLexicographical ordering -- compares the lower bound, then the upper bounds. Note that this is less performant than comparing the original s, or extracting and using (+bins^Compares if the ranges match. Note that this is less performant than comparing the original s, or extracting and using (.bins"to"bins"from"bins center / meanbinsstandard deviationbins Lower boundbins Upper boundbins Lower boundbins Upper boundbinsStandard Deviationbins Lower boundbins Upper boundbins return if bins apply if bins return if !binshow to display a value"bins!number of decimal places to round)  !"#$%&'() % !"$&'(#SafeeÙ>?@ABCDEF      !"#$%&'()*+,-./012345675689:;9<=9>?@AB9CD9CE5FG9HI56JKLMNOPQRSbins-0.1.2.0-inplaceData.Bin Paths_binsSomeBin getSomeBinBinnerBinPointedBotPElemTopBinSpecBSbsMinbsMaxbsViewBinViewbinViewlinViewlogView gaussViewlinBSlogBSgaussBSpointedpElembinIxbinFin binFinExt binFinComp withBinnerbinSpecIntervalsbinRangebinMinbinMax displayBindisplayBinDoublebinFreqfromIxfromFin expandFin unexpandFin sameBinSpec $fShowBin $fOrdSomeBin $fEqSomeBin $fShowPointed $fEqPointed $fOrdPointed$fFunctorPointed$fEqBin$fOrdBin $fShowSomeBinghc-prim GHC.ClassesEqOrdbase Data.Maybemaybe Data.Eithereither GHC.MaybeNothingXfinite-typelits-0.1.4.2-7d241a11b2813bf176fcf1f914f3665e4fd52b732c1cda6c1eedd668fda5fc53Data.Finite.InternalFiniteGHC.EnumminBoundmaxBound GHC.TypesDoubleData.Type.Equality==compareversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName