-- Do not edit! Automatically created with doctest-extract from private/Numeric/BLAS/Rank1/Convolution.hs {-# LINE 41 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} {-# OPTIONS_GHC -XTypeFamilies #-} module DocTest.ComplexFloat.Numeric.BLAS.Rank1.Convolution where import qualified Test.DocTest.Driver as DocTest {-# LINE 43 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} import Numeric.BLAS.Rank1.Convolution import Test.Numeric.FFTW.Extra.Utility import DocTest.ComplexFloat.Numeric.FFTW.Extra.Rank1.Convolution (number_) import qualified Numeric.BLAS.Vector as Vector import qualified Data.Array.Comfort.Storable as Array import qualified Data.Array.Comfort.Shape as Shape import qualified Test.QuickCheck as QC test :: DocTest.T () test = do DocTest.printPrefix "Numeric.BLAS.Rank1.Convolution:88: " {-# LINE 88 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} DocTest.property( {-# LINE 88 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} QC.forAll (genVector number_) $ \x -> QC.forAll (genVector number_) $ \y -> convolve x y =~= convolveViaTable x y ) DocTest.printPrefix "Numeric.BLAS.Rank1.Convolution:131: " {-# LINE 131 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} DocTest.property( {-# LINE 131 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} QC.forAll (genVector number_) $ \x0 -> QC.forAll (genVector number_) $ \y0 -> let (x,y) = if Shape.size (Array.shape x0) < Shape.size (Array.shape y0) then (x0,y0) else (y0,x0) in correlateLong x y =~= convolveLongToShort (Vector.reverse x) y ) DocTest.printPrefix "Numeric.BLAS.Rank1.Convolution:230: " {-# LINE 230 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} DocTest.property( {-# LINE 230 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} QC.forAll (genVector number_) $ \x -> QC.forAll genVectorShape $ \height -> QC.forAll genVectorShape $ \width -> QC.forAll (genVectorForShape number_ (height, width)) $ \ys -> convolveOneMany x ys =~= convolveOneManyViaTable x ys ) DocTest.printPrefix "Numeric.BLAS.Rank1.Convolution:338: " {-# LINE 338 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} DocTest.property( {-# LINE 338 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} QC.forAll genVectorShape $ \(Shape.ZeroBased n0) -> let shape = Shape.ZeroBased $ n0 + mod n0 2 in QC.forAll (genVectorForShape number_ shape) $ \x -> QC.forAll (genVectorForShape number_ shape) $ \y -> convolve x y =~= karatsuba x y ) DocTest.printPrefix "Numeric.BLAS.Rank1.Convolution:371: " {-# LINE 371 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} DocTest.property( {-# LINE 371 "private/Numeric/BLAS/Rank1/Convolution.hs" #-} QC.forAll genVectorShape $ \(Shape.ZeroBased n0) -> let shape = Shape.ZeroBased $ n0 + mod n0 2 in QC.forAll (genVectorForShape number_ shape) $ \x -> QC.forAll (genVectorForShape number_ shape) $ \y -> convolve x y =~= karatsubaViaMutable x y )