ac-library-hs-0.1.0.0: Data structures and algorithms
Safe HaskellNone
LanguageGHC2021

AtCoder.Internal.Convolution

Description

Internal implementation of Convolution module.

Since: 1.0.0

Synopsis

FFT information

data FftInfo (p :: k) #

Data for FFT calculation.

Since: 1.0.0

Instances

Instances details
Show (FftInfo p) #

Since: 1.0.0

Instance details

Defined in AtCoder.Internal.Convolution

Methods

showsPrec :: Int -> FftInfo p -> ShowS #

show :: FftInfo p -> String #

showList :: [FftInfo p] -> ShowS #

Eq (FftInfo p) #

Since: 1.0.0

Instance details

Defined in AtCoder.Internal.Convolution

Methods

(==) :: FftInfo p -> FftInfo p -> Bool #

(/=) :: FftInfo p -> FftInfo p -> Bool #

newInfo :: forall m (p :: Nat). (PrimMonad m, Modulus p) => m (FftInfo p) #

\(O(\log m)\) Creates FftInfo.

Since: 1.0.0

Butterfly operation

butterfly :: forall m (p :: Nat). (PrimMonad m, Modulus p) => FftInfo p -> MVector (PrimState m) (ModInt p) -> m () #

Since: 1.0.0

butterflyInv :: forall m (p :: Nat). (PrimMonad m, Modulus p) => FftInfo p -> MVector (PrimState m) (ModInt p) -> m () #

Since: 1.0.0

Convolution implementation

convolutionNaive :: forall (p :: Nat). Modulus p => Vector (ModInt p) -> Vector (ModInt p) -> Vector (ModInt p) #

Since: 1.0.0

convolutionFft :: forall (p :: Nat). Modulus p => Vector (ModInt p) -> Vector (ModInt p) -> Vector (ModInt p) #

Since: 1.0.0