From: Michael Orlitzky Date: Sun, 1 May 2011 00:58:25 +0000 (-0400) Subject: Rename the xi function to domain_point, and make a new xi function which is an alias... X-Git-Tag: 0.0.1~357 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=7d6bba8440f4327de6272e5c513959425f841c5d;p=spline3.git Rename the xi function to domain_point, and make a new xi function which is an alias to domain_point. --- diff --git a/src/Tetrahedron.hs b/src/Tetrahedron.hs index 032ce1e..ad164d2 100644 --- a/src/Tetrahedron.hs +++ b/src/Tetrahedron.hs @@ -54,10 +54,15 @@ polynomial t = -- | Returns the domain point of t with indices i,j,k,l. +-- Simply an alias for the domain_point function. xi :: Tetrahedron -> Int -> Int -> Int -> Int -> Point -xi t i j k l +xi = domain_point + +-- | Returns the domain point of t with indices i,j,k,l. +domain_point :: Tetrahedron -> Int -> Int -> Int -> Int -> Point +domain_point t i j k l | i + j + k + l == 3 = weighted_sum `scale` (1/3) - | otherwise = error "xi index out of bounds" + | otherwise = error "domain point index out of bounds" where v0' = (v0 t) `scale` (fromIntegral i) v1' = (v1 t) `scale` (fromIntegral j) @@ -66,7 +71,6 @@ xi t i j k l weighted_sum = v0' + v1' + v2' + v3' - -- | The Bernstein polynomial on t with indices i,j,k,l. Denoted by a -- capital 'B' in the Sorokina/Zeilfelder paper. beta :: Tetrahedron -> Int -> Int -> Int -> Int -> (RealFunction Point)