X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCube.hs;h=552b141e2a2f597ce7669baa9e181259e2979a96;hb=dbb641b1534f7b3a24d5b6f4479b91f1fd681c54;hp=df2f8abdc47d9e559e42d890f0955f2d87f6facf;hpb=16591937d99af4a899a28fee211cb2285b771abc;p=spline3.git diff --git a/src/Cube.hs b/src/Cube.hs index df2f8ab..552b141 100644 --- a/src/Cube.hs +++ b/src/Cube.hs @@ -1,3 +1,8 @@ +-- The "tetrahedron" function pattern matches on the integers zero +-- through twenty-three, but doesn't handle the "otherwise" case, for +-- performance reasons. +{-# OPTIONS_GHC -Wno-incomplete-patterns #-} + module Cube ( Cube(..), cube_properties, @@ -18,13 +23,14 @@ import qualified Data.Vector as V ( import Prelude hiding ( LT ) import Test.Tasty ( TestTree, testGroup ) import Test.Tasty.QuickCheck ( - Arbitrary(..), + Arbitrary( arbitrary ), Gen, - Positive(..), + Positive( Positive ), choose, testProperty ) import Cardinal ( - Cardinal(..), + Cardinal(F, B, L, R, D, T, FL, FR, FD, FT, + BL, BR, BD, BT, LD, LT, RD, RT, I), ccwx, ccwy, ccwz, @@ -35,8 +41,12 @@ import Comparisons ( (~=), (~~=) ) import qualified Face ( Face(..), center ) import FunctionValues ( FunctionValues, eval, rotate ) import Misc ( all_equal, disjoint ) -import Point ( Point(..), dot ) -import Tetrahedron ( Tetrahedron(..), barycenter, c, volume ) +import Point ( Point( Point ), dot ) +import Tetrahedron ( + Tetrahedron(Tetrahedron, function_values, v0, v1, v2, v3), + barycenter, + c, + volume ) data Cube = Cube { i :: !Int, j :: !Int,