toy-lib-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Sqrd

Description

Sqrt-decomposition. It often solves Q queries in \(O(\sqrt N F)\).

Synopsis

Documentation

data Sqrd b ret act m #

Sqrt-decomposition

Typical problems

TODO: Add read parameter?

Constructors

Sqrd 

Fields

foldSqrd :: PrimMonad m => Sqrd b ret act m -> Int -> Int -> m ret #

\(O(\sqrt N f)\)

actSqrd :: PrimMonad m => Sqrd b ret act m -> act -> Int -> Int -> m () #

\(O(\sqrt N f)\)