dims,
empty3d,
idx,
- read_values_3d,
zoom_shape
)
where
Array,
Z(..),
(:.)(..),
- DIM1,
DIM2,
DIM3,
extent,
fromList,
unsafeIndex,
- reshape
)
-import Data.Array.Repa.IO.Vector (readVectorFromTextFile)
import System.FilePath ()
import Test.QuickCheck (Arbitrary(..), Gen, choose, vectorOf)
type Values sh = Array sh Double
-type Values1D = Values DIM1
type Values2D = Values DIM2
type Values3D = Values DIM3
return three_d
-read_values_1d :: FilePath -> IO Values1D
-read_values_1d = readVectorFromTextFile
-
-
-read_values_3d :: DIM3 -> FilePath -> IO Values3D
-read_values_3d sh path = do
- one_d <- read_values_1d path
- return $ reshape sh one_d
-
empty3d :: Values3D
empty3d = Data.Array.Repa.fromList (Z :. 0 :. 0 :. 0) []