From: Michael Orlitzky Date: Mon, 7 Nov 2011 01:44:13 +0000 (-0500) Subject: Remove the now-useless make_grid function. X-Git-Tag: 0.0.1~66 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=34bd61af15ba657cdbca796ed14c1798907f8635;p=spline3.git Remove the now-useless make_grid function. --- diff --git a/src/Grid.hs b/src/Grid.hs index eb0de04..624dd84 100644 --- a/src/Grid.hs +++ b/src/Grid.hs @@ -5,7 +5,6 @@ module Grid ( cube_at, grid_tests, - make_grid, slow_tests, zoom ) @@ -53,14 +52,7 @@ instance Arbitrary Grid where arbitrary = do (Positive h') <- arbitrary :: Gen (Positive Double) fvs <- arbitrary :: Gen Values3D - return (make_grid h' fvs) - - --- | The constructor that we want people to use. --- Ignore non-positive grid sizes for performance. -make_grid :: Double -> Values3D -> Grid -make_grid grid_size values = - Grid grid_size values + return $ Grid h' fvs @@ -119,7 +111,7 @@ zoom_result :: Values3D -> ScaleFactor -> R.DIM3 -> Double zoom_result v3d (sfx, sfy, sfz) (R.Z R.:. m R.:. n R.:. o) = f p where - g = make_grid 1 v3d + g = Grid 1 v3d offset = (h g)/2 m' = (fromIntegral m) / (fromIntegral sfx) - offset n' = (fromIntegral n) / (fromIntegral sfy) - offset @@ -180,7 +172,7 @@ trilinear_c0_t0_tests = testCase "v3 is correct" test_trilinear_f0_t0_v3] ] where - g = make_grid 1 trilinear + g = Grid 1 trilinear cube = cube_at g 1 1 1 t = tetrahedron cube 0 @@ -295,7 +287,7 @@ test_trilinear_reproduced = let j' = fromIntegral j, let k' = fromIntegral k] where - g = make_grid 1 trilinear + g = Grid 1 trilinear cs = [ cube_at g ci cj ck | ci <- [0..2], cj <- [0..2], ck <- [0..2] ] @@ -313,7 +305,7 @@ test_zeros_reproduced = t0 <- tetrahedra c0, let p = polynomial t0 ] where - g = make_grid 1 zeros + g = Grid 1 zeros cs = [ cube_at g ci cj ck | ci <- [0..2], cj <- [0..2], ck <- [0..2] ] @@ -331,7 +323,7 @@ test_trilinear9x9x9_reproduced = let j' = (fromIntegral j) * 0.5, let k' = (fromIntegral k) * 0.5] where - g = make_grid 1 trilinear + g = Grid 1 trilinear c0 = cube_at g 1 1 1