import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( Assertion, assertEqual, testCase )
import Test.Tasty.QuickCheck (
import Test.Tasty ( TestTree, testGroup )
import Test.Tasty.HUnit ( Assertion, assertEqual, testCase )
import Test.Tasty.QuickCheck (
tetrahedron )
import Examples ( trilinear, trilinear9x9x9, zeros )
import FunctionValues ( make_values, value_at )
tetrahedron )
import Examples ( trilinear, trilinear9x9x9, zeros )
import FunctionValues ( make_values, value_at )
import ScaleFactor ( ScaleFactor )
import Tetrahedron (
Tetrahedron( v0, v1, v2, v3 ),
import ScaleFactor ( ScaleFactor )
import Tetrahedron (
Tetrahedron( v0, v1, v2, v3 ),
-- values of the function at the grid points, which are distance h=1
-- from one another in each direction (x,y,z).
--
-- values of the function at the grid points, which are distance h=1
-- from one another in each direction (x,y,z).
--
| otherwise = (ceiling (coord + offset)) - 1
where
(xsize, ysize, zsize) = dims (function_values g)
| otherwise = (ceiling (coord + offset)) - 1
where
(xsize, ysize, zsize) = dims (function_values g)
m' = (fromIntegral m) / (fromIntegral sfx) - offset
n' = (fromIntegral n) / (fromIntegral sfy) - offset
o' = (fromIntegral o) / (fromIntegral sfz) - offset
m' = (fromIntegral m) / (fromIntegral sfx) - offset
n' = (fromIntegral n) / (fromIntegral sfy) - offset
o' = (fromIntegral o) / (fromIntegral sfz) - offset
where
(xsize, ysize, zsize) = dims v3d
transExtent = zoom_shape scale_factor
where
(xsize, ysize, zsize) = dims v3d
transExtent = zoom_shape scale_factor
- let i' = fromIntegral i,
- let j' = fromIntegral j,
- let k' = fromIntegral k]
+ let i' = fromIntegral i :: Double,
+ let j' = fromIntegral j :: Double,
+ let k' = fromIntegral k :: Double]
- let i' = fromIntegral i,
- let j' = fromIntegral j,
- let k' = fromIntegral k,
+ let i' = fromIntegral i :: Double,
+ let j' = fromIntegral j :: Double,
+ let k' = fromIntegral k :: Double,
- let i' = (fromIntegral i) * 0.5,
- let j' = (fromIntegral j) * 0.5,
- let k' = (fromIntegral k) * 0.5]
+ let i' = (fromIntegral i) * 0.5 :: Double,
+ let j' = (fromIntegral j) * 0.5 :: Double,
+ let k' = (fromIntegral k) * 0.5 :: Double]
prop_cube_indices_never_go_out_of_bounds :: Grid -> Gen Bool
prop_cube_indices_never_go_out_of_bounds g =
do
prop_cube_indices_never_go_out_of_bounds :: Grid -> Gen Bool
prop_cube_indices_never_go_out_of_bounds g =
do
- let xmax = (fromIntegral xsize) - (1/2)
- let ymax = (fromIntegral ysize) - (1/2)
- let zmax = (fromIntegral zsize) - (1/2)
+ let xmax = (fromIntegral xsize) - (1/2) :: Double
+ let ymax = (fromIntegral ysize) - (1/2) :: Double
+ let zmax = (fromIntegral zsize) - (1/2) :: Double
x <- choose (coordmin, xmax)
y <- choose (coordmin, ymax)
x <- choose (coordmin, xmax)
y <- choose (coordmin, ymax)