ARTS 2.5.4 (git: 4c0d3b4d)
Interpolation::Lagrange Struct Reference

A Lagrange interpolation computer. More...

#include <interpolation_lagrange.h>

Public Member Functions

Index size () const noexcept
 
 Lagrange (Lagrange &&l) noexcept
 Ensure that the move constructor exists. More...
 
 Lagrange (const Lagrange &l)=default
 Ensure that the copy constructor exists. More...
 
Lagrangeoperator= (Lagrange &&l) noexcept
 Ensure that the move operator exists. More...
 
Lagrangeoperator= (const Lagrange &l)=default
 Ensure that the copy operator exists. More...
 
template<class SortedVectorType >
 Lagrange (const Index pos0, const Numeric x, const SortedVectorType &xi, const Index polyorder=1, const bool do_derivs=false, const GridType type=GridType::Standard, const std::pair< Numeric, Numeric > cycle={-180, 180}) noexcept
 
 Lagrange () noexcept
 Default constructor for zero-length elements. More...
 

Public Attributes

Index pos {0}
 
Array< Numericlx
 
Array< Numericdlx
 

Static Private Member Functions

template<class SortedVectorType >
static Array< Numericlx_finder (const Index p0, const Index n, const Numeric x, const SortedVectorType &xi, const GridType type, const std::pair< Numeric, Numeric > cycle) noexcept
 
template<class SortedVectorType >
static Array< Numericdlx_finder (const Index p0, const Index n, const Numeric x, const SortedVectorType &xi, const Array< Numeric > &li, const GridType type, const std::pair< Numeric, Numeric > cycle) noexcept
 

Friends

std::ostream & operator<< (std::ostream &os, const Lagrange &l)
 

Detailed Description

A Lagrange interpolation computer.

Definition at line 449 of file interpolation_lagrange.h.

Constructor & Destructor Documentation

◆ Lagrange() [1/4]

Interpolation::Lagrange::Lagrange ( Lagrange &&  l)
inlinenoexcept

Ensure that the move constructor exists.

Definition at line 463 of file interpolation_lagrange.h.

◆ Lagrange() [2/4]

Interpolation::Lagrange::Lagrange ( const Lagrange l)
default

Ensure that the copy constructor exists.

◆ Lagrange() [3/4]

template<class SortedVectorType >
Interpolation::Lagrange::Lagrange ( const Index  pos0,
const Numeric  x,
const SortedVectorType &  xi,
const Index  polyorder = 1,
const bool  do_derivs = false,
const GridType  type = GridType::Standard,
const std::pair< Numeric, Numeric cycle = {-180, 180} 
)
inlinenoexcept

Standard initializer, assumes sorted xi

Parameters
[in]pos0Estimation of original position, must be [0, xi.size())
[in]xNew grid position
[in]xiOld grid positions
[in]polyorderPolynominal degree
[in]do_derivsCompute derivatives?
[in]typeType of Lagrange
[in]cycleSize of a cycle if Cyclic type

Definition at line 490 of file interpolation_lagrange.h.

◆ Lagrange() [4/4]

Interpolation::Lagrange::Lagrange ( )
inlinenoexcept

Default constructor for zero-length elements.

Definition at line 511 of file interpolation_lagrange.h.

Member Function Documentation

◆ dlx_finder()

template<class SortedVectorType >
static Array< Numeric > Interpolation::Lagrange::dlx_finder ( const Index  p0,
const Index  n,
const Numeric  x,
const SortedVectorType &  xi,
const Array< Numeric > &  li,
const GridType  type,
const std::pair< Numeric, Numeric cycle 
)
inlinestaticprivatenoexcept

Finds dlx

Parameters
[in]p0Estimation of original position, must be [0, xi.size())
[in]nThe number of lx to find
[in]xNew grid position
[in]xiOld grid positions
[in]liThe lx produced by lx_finder
[in]typeType of Lagrange
[in]cycleSize of a cycle if Cyclic type

Definition at line 592 of file interpolation_lagrange.h.

◆ lx_finder()

template<class SortedVectorType >
static Array< Numeric > Interpolation::Lagrange::lx_finder ( const Index  p0,
const Index  n,
const Numeric  x,
const SortedVectorType &  xi,
const GridType  type,
const std::pair< Numeric, Numeric cycle 
)
inlinestaticprivatenoexcept

Finds lx

Parameters
[in]p0Estimation of original position, must be [0, xi.size())
[in]nThe number of lx to find
[in]xNew grid position
[in]xiOld grid positions
[in]typeType of Lagrange
[in]cycleSize of a cycle if Cyclic type

Definition at line 533 of file interpolation_lagrange.h.

◆ operator=() [1/2]

Lagrange & Interpolation::Lagrange::operator= ( const Lagrange l)
default

Ensure that the copy operator exists.

◆ operator=() [2/2]

Lagrange & Interpolation::Lagrange::operator= ( Lagrange &&  l)
inlinenoexcept

Ensure that the move operator exists.

Definition at line 469 of file interpolation_lagrange.h.

References dlx, Interpolation::l(), lx, and pos.

◆ size()

Index Interpolation::Lagrange::size ( ) const
inlinenoexcept

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Lagrange l 
)
friend

Friendly stream operator

Definition at line 514 of file interpolation_lagrange.h.

Member Data Documentation

◆ dlx

Array<Numeric> Interpolation::Lagrange::dlx

The Lagrange interpolation weights derivatives at each point

Definition at line 457 of file interpolation_lagrange.h.

Referenced by Interpolation::dinterpweights(), and operator=().

◆ lx

Array<Numeric> Interpolation::Lagrange::lx

The Lagrange interpolation weights at each point

Definition at line 454 of file interpolation_lagrange.h.

Referenced by Interpolation::dinterpweights(), Interpolation::interpweights(), operator=(), and size().

◆ pos

Index Interpolation::Lagrange::pos {0}

The first position of the Lagrange interpolation grid

Definition at line 451 of file interpolation_lagrange.h.

Referenced by Interpolation::interp(), and operator=().


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