Lagrange interpolation
To compute a Lagrange interpolation you have to instantiate a Lagrange type variable:
SemiLagrangian.Lagrange — Typestruct Lagrange{T, edge, order} <: AbstractInterpolation{T, edge, order}Type containing Lagrange Polynomials coefficients for Lagrange interpolation
Type parameters
T: the type of data that is interpolateedge::EdgeType: type of edge traitmentorder::Int: order of lagrange interpolation
Implementation :
tabfct::Vector{Polynomial{T}}: vector of all lagrange polynomial, per example the k-th Lagrange polynomial for the designed order is tabfct[k+1]
Arguments :
order::Int: the order of interpolation[T::DataType=Float64]: The type values to interpolate
Keywords arguments :
edge::EdgeType=CircEdge: type of edge traitment
SemiLagrangian._getpolylagrange — Method_getpolylagrange(k, order, origin)
Function that return the k-th Lagrange Polynomial of a certain order. If coefficients are rational then the return is exact. The polynomial is equal to :
$\prod_{i=0,\ i \neq k}^{order} \frac{x - i - origin}{k - i}$
Arguments
k::Int64: number of the Polynomial,kmust be between0andorder(0<= k <= order).order::Int64: order of the polynomial.origin::Int64: origin of the first indice.
Returns
Polynomial{Rational{BigInt}}: the k-th Lagrange polynomial of orderorder
Throws
DommaineError: when0 <= k <= orderisfalse