construct,
fromList,
identity_matrix,
- matmap,
+ map2,
row',
transpose )
import Linear.QR ( eigenvectors_symmetric )
-- 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
-- want.
norm_p (1::Int) weighted_values
where
- function_values = matmap f nodes
+ function_values = map2 f nodes
weighted_values = colzipwith (*) weights function_values