toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.SegmentTree.Beats.SumMinMax

Description

SumMinMax and AddChminChmax on the segment tree beats.

Typical problems

Synopsis

Documentation

data SumMinMax a #

Sum + Min + Max information on segment tree beats.

REMARK: Be sure to NOT use mempty as initial values in segment tree beats, use singletonSMM 0 instead.

TODO: Specialize and UNPACK.

Constructors

SumMinMax 

Fields

Instances

Instances details
Unbox a => Vector Vector (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Unbox a => MVector MVector (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a, Bounded a) => Monoid (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a) => Semigroup (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Methods

(<>) :: SumMinMax a -> SumMinMax a -> SumMinMax a #

sconcat :: NonEmpty (SumMinMax a) -> SumMinMax a #

stimes :: Integral b => b -> SumMinMax a -> SumMinMax a #

Show a => Show (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Eq a => Eq (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Methods

(==) :: SumMinMax a -> SumMinMax a -> Bool #

(/=) :: SumMinMax a -> SumMinMax a -> Bool #

FailableSemigroupActionTarget (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Methods

isFailureFSAT :: SumMinMax a -> Bool #

Unbox a => Unbox (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a, Bounded a) => SegmentAction (AddChminChmax a) (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

IsoUnbox (SumMinMax a) (SumMinMaxRepr a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

newtype MVector s (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

newtype Vector (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

data AddChminChmax a #

Add first then apply chmin and chmax, works on segment tree beats.

TODO: Specialize and UNPACK.

Constructors

AddChminChmax 

Fields

Instances

Instances details
Unbox a => Vector Vector (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Unbox a => MVector MVector (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a, Bounded a) => Monoid (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a, Bounded a) => Semigroup (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Show a => Show (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Eq a => Eq (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

Unbox a => Unbox (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

(Num a, Ord a, Bounded a) => SegmentAction (AddChminChmax a) (SumMinMax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

IsoUnbox (AddChminChmax a) (AddChminChmaxRepr a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

newtype MVector s (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

newtype Vector (AddChminChmax a) # 
Instance details

Defined in Data.SegmentTree.Beats.SumMinMax

newAddACC :: (Num a, Ord a, Bounded a) => a -> AddChminChmax a #

newChminACC :: (Num a, Ord a, Bounded a) => a -> AddChminChmax a #

newChmaxACC :: (Num a, Ord a, Bounded a) => a -> AddChminChmax a #

Unbox instances

type SumMinMaxRepr a = (a, a, a, a, a, (Int, Int, Bool)) #

type AddChminChmaxRepr a = (a, a, a) #