]> gitweb.michael.orlitzky.com - numerical-analysis.git/blobdiff - src/Integration/Gaussian.hs
Update Integration.Gaussian to use zip2.
[numerical-analysis.git] / src / Integration / Gaussian.hs
index 8fcca4f710d4fd918e061f475196ad3c9a2af1e5..6eb46f6683a9c58d0105da1f1519d732c53bdd64 100644 (file)
@@ -24,13 +24,13 @@ import Linear.Matrix (
   Col,
   Col10,
   Mat(..),
-  colzipwith,
   construct,
   fromList,
   identity_matrix,
-  matmap,
-  row',
-  transpose )
+  map2,
+  row,
+  transpose,
+  zipwith2 )
 import Linear.QR ( eigenvectors_symmetric )
 import Normed ( Normed(..) )
 
@@ -119,11 +119,11 @@ nodes_and_weights iterations =
     nodes = shifted_nodes + ones -- unshift the nodes
 
     -- Get the first component of each column.
-    first_components = row' vecs 0
+    first_components = row vecs 0
 
     -- Square it and multiply by 2; see the Golub-Welsch paper for
     -- this magic.
-    weights_row = matmap (\x -> (fromInteger 2)*x^2) first_components
+    weights_row = map2 (\x -> (fromInteger 2)*x^2) first_components
 
     weights = transpose $ weights_row
 
@@ -212,5 +212,5 @@ gaussian' f nodes weights =
   -- want.
   norm_p (1::Int) weighted_values
   where
-    function_values = matmap f nodes
-    weighted_values = colzipwith (*) weights function_values
+    function_values = map2 f nodes
+    weighted_values = zipwith2 (*) weights function_values