)
import System.FilePath ()
-import Test.QuickCheck (Arbitrary(..), Gen, choose, vectorOf)
-
import ScaleFactor (ScaleFactor)
type Values3D = Values DIM3
-instance Arbitrary Values3D where
- arbitrary = do
- -- I declare not to care about empty lists.
- x_dim <- choose (1, 27)
- y_dim <- choose (1, 27)
- z_dim <- choose (1, 27)
- elements <- vectorOf (x_dim * y_dim * z_dim) (arbitrary :: Gen Double)
- let new_shape = (Z :. x_dim :. y_dim :. z_dim)
- let three_d = Data.Array.Repa.fromListUnboxed new_shape elements
- return three_d
-
-
empty3d :: Values3D
empty3d = Data.Array.Repa.fromListUnboxed (Z :. 0 :. 0 :. 0) []