lagrange_nd


lagrange_nd, an Octave code which is given a set of ND points X(*) in D-dimensional space, and constructs a family of ND Lagrange polynomials P(*)(X), associating polynomial P(i) with point X(i), such that, for 1 <= i <= ND,

        P(i)(X(i)) = 1
      
but, if i =/= j
        P(i)(X(j)) = 0
      

The library currently includes the following primary routines:

The set of ND polynomials P(*)(X) are returned as a set of three arrays:

Each value of PE(i,j) is an exponent codes which can be converted to a vector of exponents that define a monomial. For example, if we are working in spatial dimension D=3, then if PE(i,j)=13, the corresponding exponent vector is (0,2,1), so this means that the j-th term in polynomial i is

        PC(i,j) * x^0 y^2 z^1
      
An exponent code can be converted to an exponent vector by calling mono_unrank_grlex().

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

lagrange_nd is available in a C++ version and a Fortran90 version and a MATLAB version and an Octave version.

Related Data and Programs:

lagrange_nd_test

lagrange_interp_nd, an Octave code which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of multivariate data, so that p(x(i)) = y(i).

sparse_interp_nd an Octave code which can be used to define a sparse interpolant to a function f(x) of a multidimensional argument.

spinterp, an Octave code which carries out piecewise multilinear hierarchical sparse grid interpolation; an earlier version of this software is ACM TOMS Algorithm 847, by Andreas Klimke;

test_interp_nd, an Octave code which defines test problems for interpolation of data z(x), depending on an M-dimensional argument.

Reference:

  1. Philip Davis,
    Interpolation and Approximation,
    Dover, 1975,
    ISBN: 0-486-62495-1,
    LC: QA221.D33
  2. Tomas Sauer, Yuan Xu,
    On multivariate Lagrange interpolation,
    Mathematics of Computation,
    Volume 64, Number 211, July 1995, pages 1147-1170.

Source Code:


Last modified on 15 June 2023.