dims,
empty3d,
idx,
- zoom_shape
- )
+ zoom_shape )
where
import Data.Array.Repa (
Array, U,
- Z(..),
- (:.)(..),
+ Z( Z ),
+ (:.)( (:.) ),
DIM2,
DIM3,
extent,
fromListUnboxed,
- unsafeIndex,
- )
+ unsafeIndex )
-import System.FilePath ()
-import Test.QuickCheck (Arbitrary(..), Gen, choose, vectorOf)
-
-
-import ScaleFactor (ScaleFactor)
+import ScaleFactor ( ScaleFactor )
type Values sh = Array U sh Double
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) []