X-Git-Url: http://gitweb.michael.orlitzky.com/?p=numerical-analysis.git;a=blobdiff_plain;f=src%2FIntegration%2FGaussian.hs;h=38214a0a5be7468b0b061e484ca0bb16d01556ff;hp=8fcca4f710d4fd918e061f475196ad3c9a2af1e5;hb=b64e8d2a0ef24e880265b9ba4997c3d4eb995570;hpb=91069005ec9f5249efe64cb96fb84fbbd70aad25 diff --git a/src/Integration/Gaussian.hs b/src/Integration/Gaussian.hs index 8fcca4f..38214a0 100644 --- a/src/Integration/Gaussian.hs +++ b/src/Integration/Gaussian.hs @@ -28,7 +28,7 @@ import Linear.Matrix ( construct, fromList, identity_matrix, - matmap, + map2, row', transpose ) import Linear.QR ( eigenvectors_symmetric ) @@ -123,7 +123,7 @@ nodes_and_weights iterations = -- 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 + function_values = map2 f nodes weighted_values = colzipwith (*) weights function_values