From: Michael Orlitzky Date: Tue, 25 Oct 2011 03:57:22 +0000 (-0400) Subject: Add bang patterns to the Tetrahedron module (Ben Lippmeier). X-Git-Tag: 0.0.1~86 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=5c2ac2ca74f2657ff8af381d3bcda72a37b39fb7;p=spline3.git Add bang patterns to the Tetrahedron module (Ben Lippmeier). --- diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index e71151a..670a6e0 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE BangPatterns #-} module Tetrahedron ( Tetrahedron(..), b0, -- Cube test @@ -33,11 +34,11 @@ import ThreeDimensional (ThreeDimensional(..)) data Tetrahedron = Tetrahedron { function_values :: FunctionValues, - v0 :: Point, - v1 :: Point, - v2 :: Point, - v3 :: Point, - precomputed_volume :: Double + v0 :: !Point, + v1 :: !Point, + v2 :: !Point, + v3 :: !Point, + precomputed_volume :: !Double } deriving (Eq) @@ -142,7 +143,7 @@ beta t i j k l -- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the -- function will simply error. c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double -c t i j k l = +c !t !i !j !k !l = coefficient i j k l where fvs = function_values t