quadpts moments::product_difference ( size_t  dimension,
size_t  num_points 
) const

Function that computes the quadrature points and weights from the moments using the product-difference algorithm.

Parameters:
dimension: Dimension of the problem
num_points: Number of quadrature points
Returns:
quadpts : A vector of class quadpts

Uses the product - difference algorithm detailed in Gordon, R.G., 1968. Error bounds in equilibrium statistical mechanics. J Math Phys, 9, 655-663 (1968). Works only for the univariate case. Error message is returned if attempted with dimension > 1.

 All Classes Files Functions Variables Typedefs Friends Defines