From 7d6bba8440f4327de6272e5c513959425f841c5d Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 30 Apr 2011 20:58:25 -0400 Subject: [PATCH] Rename the xi function to domain_point, and make a new xi function which is an alias to domain_point. --- src/Tetrahedron.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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) -- 2.43.2