-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | see readme.md
--
-- see readme.md for description.
@package numhask-range
@version 0.0.2
-- | A Range a is a tuple representing an interval of a number
-- space. A Range can be thought of as consisting of a low and high
-- value, though low<high isn't strictly enforced, allowing a negative
-- space so to speak. The library uses the NumHask classes and
-- thus most of the usual arithmetic operators can be used.
module NumHask.Range
-- | a newtype wrapped (a, a) tuple
newtype Range a
Range :: (a, a) -> Range a
[range_] :: Range a -> (a, a)
-- | alternative constructor
(...) :: Ord a => a -> a -> Range a
-- | lens for the fst of the tuple
low :: Lens' (Range a) a
-- | lens for the snd of the tuple
high :: Lens' (Range a) a
-- | mid-value lens
mid :: (BoundedField a) => Lens' (Range a) a
-- | range width lens
width :: (BoundedField a) => Lens' (Range a) a
-- | determine whether a point is within the range
element :: (Ord a) => a -> Range a -> Bool
singleton :: a -> Range a
-- | is the range a singleton point
singular :: (Eq a) => Range a -> Bool
intersection :: (Ord a) => Range a -> Range a -> Range a
contains :: (Ord a) => Range a -> Range a -> Bool
-- | range of a foldable
range :: (Foldable f, Ord a, BoundedField a) => f a -> Range a
-- | project a data point from an old range to a new range project o n
-- (view low o) == view low n project o n (view high o) == view high n
-- project a a == id
project :: (Field b) => Range b -> Range b -> b -> b
-- | overns where data points go on the range
data LinearPos
OuterPos :: LinearPos
InnerPos :: LinearPos
LowerPos :: LinearPos
UpperPos :: LinearPos
MidPos :: LinearPos
-- | turn a range into a list of n equally-spaced as
linearSpace :: (Field a, FromInteger a) => LinearPos -> Range a -> Int -> [a]
-- | turn a range into n as pleasing to human sense and
-- sensibility the as may well lie outside the original range as
-- a result
linearSpaceSensible :: (Fractional a, Ord a, FromInteger a, QuotientField a, ExpField a) => LinearPos -> Range a -> Int -> [a]
-- | take a list of (ascending) as and make some (ascending)
-- ranges based on OuterPos fromLinearSpace . linearSpace OuterPos == id
-- linearSpace OuterPos . fromLinearSpace == id
fromLinearSpace :: [a] -> [Range a]
instance GHC.Classes.Eq NumHask.Range.LinearPos
instance GHC.Base.Functor NumHask.Range.Range
instance GHC.Show.Show a => GHC.Show.Show (NumHask.Range.Range a)
instance GHC.Classes.Ord a => GHC.Classes.Ord (NumHask.Range.Range a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (NumHask.Range.Range a)
instance Test.QuickCheck.Arbitrary.Arbitrary a => Test.QuickCheck.Arbitrary.Arbitrary (NumHask.Range.Range a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveMagma (NumHask.Range.Range a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Additive.AdditiveUnital (NumHask.Range.Range a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveAssociative (NumHask.Range.Range a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveCommutative (NumHask.Range.Range a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Additive.Additive (NumHask.Range.Range a)
instance GHC.Classes.Ord a => Data.Semigroup.Semigroup (NumHask.Range.Range a)
instance (NumHask.Algebra.Additive.AdditiveUnital (NumHask.Range.Range a), Data.Semigroup.Semigroup (NumHask.Range.Range a)) => GHC.Base.Monoid (NumHask.Range.Range a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveInvertible (NumHask.Range.Range a)
instance (NumHask.Algebra.Field.BoundedField a, GHC.Classes.Ord a) => NumHask.Algebra.Additive.AdditiveGroup (NumHask.Range.Range a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Additive.AdditiveHomomorphic (NumHask.Range.Range a) a
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveHomomorphic a (NumHask.Range.Range a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeMagma (NumHask.Range.Range a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeUnital (NumHask.Range.Range a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeAssociative (NumHask.Range.Range a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeInvertible (NumHask.Range.Range a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeRightCancellative (NumHask.Range.Range a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeLeftCancellative (NumHask.Range.Range a)
instance (NumHask.Algebra.Field.BoundedField a, GHC.Classes.Ord a) => NumHask.Algebra.Metric.Signed (NumHask.Range.Range a)
instance NumHask.Algebra.Additive.AdditiveGroup a => NumHask.Algebra.Metric.Normed (NumHask.Range.Range a) a
instance (GHC.Classes.Ord a, NumHask.Algebra.Additive.AdditiveGroup a) => NumHask.Algebra.Metric.Metric (NumHask.Range.Range a) a
module NumHask.Rect
-- | a two-dimensional plane, bounded by ranges.
newtype Rect a
Rect :: V2 (Range a) -> Rect a
[xy] :: Rect a -> V2 (Range a)
-- | an alternative specification; as a 4-dim vector `V4 x y z w` where: -
-- (x,y) is the lower left corner of a rectangle, and - (z,w) is the
-- upper right corner of a rectangle
rect :: Iso' (V4 a) (Rect a)
corners :: Rect a -> [V2 a]
midRect :: (BoundedField a) => Rect a -> V2 a
-- | determine whether a point is within the range
elementRect :: (Ord a) => V2 a -> Rect a -> Bool
singletonRect :: V2 a -> Rect a
-- | is the range a singleton V2 (has zero area)
singularRect :: (Eq a) => Rect a -> Bool
intersectionRect :: (Ord a) => Rect a -> Rect a -> Rect a
containsRect :: (Ord a) => Rect a -> Rect a -> Bool
-- | range specialized to double traversables
rangeR2s :: (BoundedField a, Traversable g, Traversable f, R2 r, Ord a) => g (f (r a)) -> Rect a
-- | project a double container of r2s from the current Rect range
scaleR2s :: (R2 r, BoundedField a, Traversable f, Traversable g, Ord a) => Rect a -> g (f (r a)) -> g (f (r a))
-- | the range Rect of a container of Rects
rangeRects :: (Ord a, BoundedField a, Traversable f) => f (Rect a) -> Rect a
-- | project a Rect from an old Rect range to a new one
projectRect :: (Field a) => Rect a -> Rect a -> Rect a -> Rect a
-- | scale a double container of Rects from the current range
scaleRects :: (BoundedField a, Traversable f, Ord a) => Rect a -> f (Rect a) -> f (Rect a)
-- | scale a double container of Rects from the current range
scaleRectss :: (BoundedField a, Traversable f, Traversable g, Ord a) => Rect a -> g (f (Rect a)) -> g (f (Rect a))
-- | grid points on a rectange, divided up by a V2 Int
gridP :: (Field a, FromInteger a) => LinearPos -> Rect a -> V2 Int -> [V2 a]
-- | a rectangle divided up by a V2 Int, making a list of smaller
-- rectangles
grid :: (BoundedField a, FromInteger a) => Rect a -> V2 Int -> [Rect a]
instance GHC.Base.Functor NumHask.Rect.Rect
instance GHC.Classes.Ord a => GHC.Classes.Ord (NumHask.Rect.Rect a)
instance GHC.Classes.Eq a => GHC.Classes.Eq (NumHask.Rect.Rect a)
instance GHC.Show.Show a => GHC.Show.Show (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveMagma (NumHask.Rect.Rect a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Additive.AdditiveUnital (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveAssociative (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveCommutative (NumHask.Rect.Rect a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Additive.Additive (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => Data.Semigroup.Semigroup (NumHask.Rect.Rect a)
instance (NumHask.Algebra.Additive.AdditiveUnital (NumHask.Rect.Rect a), Data.Semigroup.Semigroup (NumHask.Rect.Rect a)) => GHC.Base.Monoid (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveInvertible (NumHask.Rect.Rect a)
instance (NumHask.Algebra.Field.BoundedField a, GHC.Classes.Ord a) => NumHask.Algebra.Additive.AdditiveGroup (NumHask.Rect.Rect a)
instance GHC.Classes.Ord a => NumHask.Algebra.Additive.AdditiveHomomorphic (Linear.V2.V2 a) (NumHask.Rect.Rect a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeMagma (NumHask.Rect.Rect a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeUnital (NumHask.Rect.Rect a)
instance NumHask.Algebra.Field.BoundedField a => NumHask.Algebra.Multiplicative.MultiplicativeAssociative (NumHask.Rect.Rect a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeInvertible (NumHask.Rect.Rect a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeLeftCancellative (NumHask.Rect.Rect a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Field.BoundedField a) => NumHask.Algebra.Multiplicative.MultiplicativeRightCancellative (NumHask.Rect.Rect a)
instance (NumHask.Algebra.Field.BoundedField a, GHC.Classes.Ord a) => NumHask.Algebra.Metric.Signed (NumHask.Rect.Rect a)
instance NumHask.Algebra.Additive.AdditiveGroup a => NumHask.Algebra.Metric.Normed (NumHask.Rect.Rect a) (Linear.V2.V2 a)
instance (GHC.Classes.Ord a, NumHask.Algebra.Additive.AdditiveGroup a) => NumHask.Algebra.Metric.Metric (NumHask.Rect.Rect a) (Linear.V2.V2 a)
module NumHask.Histogram
data Histogram
Histogram :: [Double] -> Map Int Double -> Histogram
[_cuts] :: Histogram -> [Double]
[_values] :: Histogram -> Map Int Double
freq :: Histogram -> Histogram
fill :: [Double] -> [Double] -> Histogram
data DealOvers
IgnoreOvers :: DealOvers
IncludeOvers :: Double -> DealOvers
fromHist :: DealOvers -> Histogram -> [Rect Double]
hist :: [Double] -> Double -> Fold Double Histogram
labels :: DealOvers -> [Double] -> [Text]
-- | The insert function takes an element and a list and inserts the
-- element into the list at the first position where it is less than or
-- equal to the next element. In particular, if the list is sorted before
-- the call, the result will also be sorted. It is a special case of
-- insertBy, which allows the programmer to supply their own
-- comparison function.
insert :: Ord a => a -> [a] -> [a]
insertW :: Histogram -> Double -> Double -> Histogram
insertWs :: Histogram -> [(Double, Double)] -> Histogram
instance GHC.Classes.Eq NumHask.Histogram.Histogram
instance GHC.Show.Show NumHask.Histogram.Histogram