- fromList,
- index,
- reshape,
- )
-
-import Data.Array.Repa.IO.Vector (readVectorFromTextFile)
-import System.FilePath ()
-import Test.QuickCheck (Arbitrary(..), Gen)
-
-
-type Values1D = Array DIM1 Double
-type Values2D = Array DIM2 Double
-type Values3D = Array DIM3 Double
-
-
-instance Arbitrary Values3D where
- arbitrary = do
- x_dim <- arbitrary :: Gen Int
- y_dim <- arbitrary :: Gen Int
- z_dim <- arbitrary :: Gen Int
- one_d <- arbitrary :: Gen Values1D
- let new_shape = (Z :. x_dim :. y_dim :. z_dim)
- let three_d = reshape new_shape one_d
- return three_d