Skip to content
C++ code to compute the Legendre-Gauss nodes and weights on [-1,1], based on NumPy's leggauss function
C++ C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
legendre.cpp
legendre.h

README.md

LegendreGauss

C++ code to compute the Legendre-Gauss nodes and weights on [-1,1], based on NumPy's leggauss function

Requirements

Eigen 3.3

Usage

To compute the Legendre-Gauss nodes and weights of degree n:

#include "legendre.h"

Eigen::MatrixXd ret = leggauss(n);

The nodes and weights are contained in the first and second rows of ret, respectively.

You can’t perform that action at this time.