Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Sqrt-decomposition. It often solves Q queries in \(O(\sqrt N F)\).
Synopsis
- type BlockIndex = Int
- data Sqrd b ret act m = Sqrd {
- blockLenSqrd :: !Int
- readFullSqrd :: !(BlockIndex -> m ret)
- readPartSqrd :: !(BlockIndex -> Int -> Int -> m ret)
- mergeSqrd :: !(ret -> ret -> m ret)
- actFullSqrd :: !(BlockIndex -> act -> m ())
- actPartSqrd :: !(BlockIndex -> act -> Int -> Int -> m ())
- foldSqrd :: PrimMonad m => Sqrd b ret act m -> Int -> Int -> m ret
- actSqrd :: PrimMonad m => Sqrd b ret act m -> act -> Int -> Int -> m ()
Documentation
type BlockIndex = Int #
Sqrd | |
|