X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FExamples.hs;h=6300ce82460b2dde4e823f05f3400c9004cab09e;hb=3f7331f579118687cd73b977ce6aa7d401f88a09;hp=f90a819cd3d6cf2dac1b4171ebafe78e49c90a75;hpb=fcdbcc6c67790a5a003fdad28685a943a5cd76ce;p=spline3.git diff --git a/src/Examples.hs b/src/Examples.hs index f90a819..6300ce8 100644 --- a/src/Examples.hs +++ b/src/Examples.hs @@ -1,10 +1,17 @@ -module Examples +module Examples ( + naturals, + naturals_1d, + trilinear, + trilinear_zoom_2, + trilinear9x9x9, + zeros + ) where import qualified Data.Array.Repa as Repa -import Misc -import Values +import Misc (flatten, transpose_xz) +import Values (Values3D) -- | Values of the function f(x,y,z) = 1 + x + xy + xyz taken at nine @@ -28,7 +35,7 @@ n_cube n = (Repa.Z Repa.:. n Repa.:. n Repa.:. n) trilinear :: Values3D trilinear = Repa.fromList (n_cube 3) $ flatten $ - transpose_xz $ + transpose_xz trilinear_list @@ -41,7 +48,7 @@ trilinear_zoom_2_list = [[[1, 3/2, 2, 5/2, 3], [1, 7/4, 5/2, 13/4, 4], [1, 2, 3, trilinear_zoom_2 :: Values3D trilinear_zoom_2 = Repa.fromList (n_cube 6) $ flatten $ - transpose_xz $ + transpose_xz trilinear_zoom_2_list @@ -55,7 +62,7 @@ trilinear9x9x9_list = [[[1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5], [1, 1.75, 2.5, 3.25 trilinear9x9x9 :: Values3D trilinear9x9x9 = Repa.fromList (n_cube 9) $ flatten $ - transpose_xz $ + transpose_xz trilinear9x9x9_list @@ -97,7 +104,7 @@ naturals_list = [ [ [ 0, 1, 2 ], naturals :: Values3D naturals = Repa.fromList (n_cube 3) $ flatten $ - transpose_xz $ + transpose_xz naturals_list