ROL
Public Member Functions | Private Attributes | List of all members
Lagrange< Real > Class Template Reference

#include <Lagrange.hpp>

Public Member Functions

 Lagrange (const std::vector< Real > &xin, const std::vector< Real > &xev)
 Interpolation object which interpolates from to the grid xin to xev. More...
 
 ~Lagrange ()
 
void interp (const std::vector< Real > &f, std::vector< Real > &p)
 Given the values of a function on the interpolation points xin, stored in f, evaluate the interpolating polynomial on the evaluation points xev. More...
 
void dinterp (const std::vector< Real > &f, std::vector< Real > &p)
 
void interpolant (const int k, std::vector< Real > &l)
 Evaluate the kth interpolant on the evaluation points. More...
 
void derivative (const int k, std::vector< Real > &d)
 Derivative of the \(k\)th interpolant on the interpolation points. More...
 
void bi_sum (const std::vector< Real > &f, std::vector< Real > &y)
 This routine evaluates sums of the form shown in equation (4.2) in the paper by J-P Berrut and L.N. Trefethen. More...
 

Private Attributes

const std::vector< Real > xin_
 
const std::vector< Real > xev_
 
const int nin_
 
const int nev_
 
std::vector< Real > w_
 
std::vector< Real > ell_
 
std::vector< Real > D_
 

Detailed Description

template<class Real>
class Lagrange< Real >

Definition at line 16 of file Lagrange.hpp.

Constructor & Destructor Documentation

template<class Real >
Lagrange< Real >::Lagrange ( const std::vector< Real > &  xin,
const std::vector< Real > &  xev 
)

Interpolation object which interpolates from to the grid xin to xev.

Parameters
[in]xinvector of interpolation points
[in]xevvector of evaluation points

Definition at line 66 of file Lagrange.hpp.

References Lagrange< Real >::bi_sum(), Lagrange< Real >::D_, Lagrange< Real >::ell_, Lagrange< Real >::nev_, Lagrange< Real >::nin_, Lagrange< Real >::w_, and Lagrange< Real >::xin_.

template<class Real >
Lagrange< Real >::~Lagrange ( )

Definition at line 124 of file Lagrange.hpp.

Member Function Documentation

template<class Real >
void Lagrange< Real >::interp ( const std::vector< Real > &  f,
std::vector< Real > &  p 
)

Given the values of a function on the interpolation points xin, stored in f, evaluate the interpolating polynomial on the evaluation points xev.

Parameters
[in]fvector of function values sampled at xin
[out]yvector of interpolating polynomial values evaluated ay xev

Definition at line 156 of file Lagrange.hpp.

template<class Real >
void Lagrange< Real >::dinterp ( const std::vector< Real > &  f,
std::vector< Real > &  p 
)

Definition at line 166 of file Lagrange.hpp.

template<class Real >
void Lagrange< Real >::interpolant ( const int  k,
std::vector< Real > &  l 
)

Evaluate the kth interpolant on the evaluation points.

Parameters
[in]kvector of function values sampled at xin
[out]yvector of interpolating polynomial values evaluated ay xev

Definition at line 185 of file Lagrange.hpp.

template<class Real >
void Lagrange< Real >::derivative ( const int  k,
std::vector< Real > &  d 
)

Derivative of the \(k\)th interpolant on the interpolation points.

Definition at line 200 of file Lagrange.hpp.

References D_.

template<class Real >
void Lagrange< Real >::bi_sum ( const std::vector< Real > &  f,
std::vector< Real > &  y 
)

This routine evaluates sums of the form shown in equation (4.2) in the paper by J-P Berrut and L.N. Trefethen.

Parameters
[in]fvector of values appearing in the sum
[out]ythe result

Definition at line 131 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

Member Data Documentation

template<class Real >
const std::vector<Real> Lagrange< Real >::xin_
private
Parameters
xin_Vector of interpolation points

Definition at line 39 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

template<class Real >
const std::vector<Real> Lagrange< Real >::xev_
private

Definition at line 42 of file Lagrange.hpp.

template<class Real >
const int Lagrange< Real >::nin_
private

Definition at line 45 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

template<class Real >
const int Lagrange< Real >::nev_
private

Definition at line 48 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

template<class Real >
std::vector<Real> Lagrange< Real >::w_
private

Definition at line 51 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

template<class Real >
std::vector<Real> Lagrange< Real >::ell_
private

Definition at line 54 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().

template<class Real >
std::vector<Real> Lagrange< Real >::D_
private

Definition at line 57 of file Lagrange.hpp.

Referenced by Lagrange< Real >::Lagrange().


The documentation for this class was generated from the following file: