MUQ  0.4.3
muq::Approximation::Laguerre Class Reference

Family of Laguerre orthogonal polynomials. More...

#include <Laguerre.h>

Inheritance diagram for muq::Approximation::Laguerre:

Detailed Description

Family of Laguerre orthogonal polynomials.

Definition at line 13 of file Laguerre.h.

Public Member Functions

 Laguerre (const double aIn=0.0)
 
virtual ~Laguerre ()=default
 
virtual double DerivativeEvaluate (int const polyOrder, int const derivOrder, double const x) const override
 
virtual double Normalization (unsigned int polyOrder) const override
 
- Public Member Functions inherited from muq::Approximation::OrthogonalPolynomial
 OrthogonalPolynomial ()
 Create a polynomial. More...
 
virtual ~OrthogonalPolynomial ()=default
 
virtual double BasisEvaluate (int const order, double const x) const override
 Evaluate the specific polynomial type (must be implemented by the child) More...
 
virtual Eigen::VectorXd EvaluateAllTerms (int const maxOrder, double const x) const override
 Evaluates all basis functions with order <= maxOrder. More...
 
- Public Member Functions inherited from muq::Approximation::IndexedScalarBasis
 IndexedScalarBasis ()
 Create a basis function. More...
 
virtual ~IndexedScalarBasis ()=default
 
- Public Member Functions inherited from muq::Modeling::WorkPiece
 WorkPiece ()
 Create a muq::Modeling::WorkPiece with no fixed number of inputs and outputs and variable input/output types. More...
 
 WorkPiece (int const num, WorkPiece::Fix const fix=WorkPiece::Fix::Inputs)
 Create a muq::Modeling::WorkPiece with either a fixed number of inputs or outputs and variable input/output types. More...
 
 WorkPiece (int const numIns, int const numOuts)
 Create a muq::Modeling::WorkPiece with a fixed number of inputs and outputs but variable input/output types. More...
 
 WorkPiece (std::vector< std::string > const &types, WorkPiece::Fix const fix=WorkPiece::Fix::Inputs)
 Create a muq::Modeling::WorkPiece with either a fixed number of inputs with specified types or a fixed number of outputs with specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &types, WorkPiece::Fix const fix=WorkPiece::Fix::Inputs)
 Create a muq::Modeling::WorkPiece where either some of the inputs have specified types or some of the outputs have specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &types, int const num, WorkPiece::Fix const fixTypes=WorkPiece::Fix::Inputs, WorkPiece::Fix const fixNum=WorkPiece::Fix::Inputs)
 Create a muq::Modeling::WorkPiece where either some of the inputs have specified types or some of the outputs have specified types and either the number of inputs or the number of outputs is fixed. More...
 
 WorkPiece (std::vector< std::string > const &types, int const num)
 Create a muq::Modeling::WorkPiece with a fixed number of inputs with specified types and a fixed number of outputs (of uknown type) More...
 
 WorkPiece (int const num, std::vector< std::string > const &types)
 Create a muq::Modeling::WorkPiece with a fixed number of outputs with specified types and a fixed number of inputs (of uknown type) More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, int const numIns, int const numOuts)
 Create a muq::Modeling::WorkPiece where some of the inputs are known and we know the input and output numbers. More...
 
 WorkPiece (int const numIns, std::map< unsigned int, std::string > const &outTypes, int const numOuts)
 Create a muq::Modeling::WorkPiece where some of the outputs are known and we know the input and output numbers. More...
 
 WorkPiece (std::vector< std::string > const &inTypes, std::vector< std::string > const &outTypes)
 Create a muq::Modeling::WorkPiece with a fixed number of inputs and outputs with specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, std::vector< std::string > const &outTypes)
 Create a muq::Modeling::WorkPiece where some of the inputs are known and all of the outputs have specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, int const num, std::vector< std::string > const &outTypes)
 Create a muq::Modeling::WorkPiece where some of the inputs are known with a known number of inputs and all of the outputs have specified types. More...
 
 WorkPiece (std::vector< std::string > const &inTypes, std::map< unsigned int, std::string > const &outTypes)
 Create a muq::Modeling::WorkPiece where some of the outputs and all of the inputs have specified types. More...
 
 WorkPiece (std::vector< std::string > const &inTypes, std::map< unsigned int, std::string > const &outTypes, int const num)
 Create a muq::Modeling::WorkPiece where some of the outputs with a known number of outputs and all of the inputs have specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, std::map< unsigned int, std::string > const &outTypes)
 Create a muq::Mdoeling::WorkPiece where some of the inputs and some of the outputs have specified types. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, int const numIn, std::map< unsigned int, std::string > const &outTypes)
 Create a muq::Mdoeling::WorkPiece where some of the inputs and some of the outputs have specified types with a fixed number of inputs. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, std::map< unsigned int, std::string > const &outTypes, int const numOut)
 Create a muq::Mdoeling::WorkPiece where some of the inputs and some of the outputs have specified types with a fixed number of outputs. More...
 
 WorkPiece (std::map< unsigned int, std::string > const &inTypes, int const numIn, std::map< unsigned int, std::string > const &outTypes, int const numOut)
 Create a muq::Mdoeling::WorkPiece where some of the inputs and some of the outputs have specified types with a fixed number of inputs and outputs. More...
 
virtual ~WorkPiece ()
 Default destructor. More...
 
std::vector< boost::any > const & Evaluate (std::vector< boost::any > const &ins)
 Evaluate this muq::Modeling::WorkPiece. More...
 
std::vector< boost::any > const & Evaluate (ref_vector< boost::any > const &ins)
 Evaluate this muq::Modeling::WorkPiece using references to the inputs. More...
 
std::vector< boost::any > const & Evaluate ()
 Evaluate this muq::Modeling::WorkPiece in the case that there are no inputs. More...
 
template<typename... Args>
std::vector< boost::any > const & Evaluate (Args... args)
 Evalaute this muq::Modeling::WorkPiece using multiple arguments. More...
 
std::string const & Name ()
 Get the (unique) name of this work piece. More...
 
void SetName (std::string const &newName)
 Set the name of this work piece. More...
 
std::string InputType (unsigned int inputNum, bool const demangle=true) const
 Get the input type (if we know it) for a specific input. More...
 
int InputSize (unsigned int inputNum) const
 Get the length of a vector valued input with fixed size. More...
 
void SetInputSize (unsigned int inputNum, int newSize)
 
std::string OutputType (unsigned int outputNum, bool const demangle=true) const
 Get the output type (if we know it) for a specific output. More...
 
std::map< unsigned int, std::string > OutputTypes () const
 Get the output types. More...
 
std::map< unsigned int, std::string > InputTypes () const
 Get the input types. More...
 
unsigned int ID () const
 Get the unique ID number. More...
 
virtual double GetRunTime (const std::string &method="Evaluate") const
 Get the average run time for one of the implemented methods. More...
 
virtual unsigned long int GetNumCalls (const std::string &method="Evaluate") const
 get the number of times one of the implemented methods has been called. More...
 
virtual void ResetCallTime ()
 Resets the number of call and times. More...
 

Additional Inherited Members

- Public Types inherited from muq::Approximation::IndexedScalarBasis
typedef std::function< std::shared_ptr< IndexedScalarBasis >)> ScalarBasisConstructorType
 
typedef std::map< std::string, ScalarBasisConstructorTypeScalarBasisMapType
 
- Static Public Member Functions inherited from muq::Approximation::OrthogonalPolynomial
static std::shared_ptr< OrthogonalPolynomialConstruct (std::string const &polyName)
 
- Static Public Member Functions inherited from muq::Approximation::IndexedScalarBasis
static std::shared_ptr< ScalarBasisMapTypeGetScalarBasisMap ()
 
static std::shared_ptr< IndexedScalarBasisConstruct (std::string const &polyName)
 
- Static Public Member Functions inherited from muq::Modeling::WorkPiece
static ref_vector< const boost::any > ToRefVector (std::vector< boost::any > const &anyVec)
 Create vector of references from a vector of boost::any's. More...
 
static ref_vector< const Eigen::VectorXd > ToRefVector (std::vector< Eigen::VectorXd > const &anyVec)
 
- Public Attributes inherited from muq::Modeling::WorkPiece
int numInputs
 The number of inputs. More...
 
int numOutputs
 The number of outputs. More...
 

Constructor & Destructor Documentation

◆ Laguerre()

muq::Approximation::Laguerre::Laguerre ( const double  aIn = 0.0)
inline

Laguerre polynomials are orthogonal over \([0,\infty)\) with respect to \(\exp(-x)x^a\).

Definition at line 19 of file Laguerre.h.

Referenced by DerivativeEvaluate().

◆ ~Laguerre()

virtual muq::Approximation::Laguerre::~Laguerre ( )
virtualdefault

Member Function Documentation

◆ ak()

double Laguerre::ak ( unsigned int  k) const
overrideprivatevirtual

Implement \(a_k(x)\).

Parameters
[in]kThe order of the polynomial

Implements muq::Approximation::OrthogonalPolynomial.

Definition at line 16 of file Laguerre.cpp.

References nlohmann::detail::dtoa_impl::k.

◆ bk()

double Laguerre::bk ( unsigned int  k) const
overrideprivatevirtual

Implement \(b_k(x)\).

Parameters
[in]kThe order of the polynomial

Implements muq::Approximation::OrthogonalPolynomial.

Definition at line 19 of file Laguerre.cpp.

References a, and nlohmann::detail::dtoa_impl::k.

◆ ck()

double Laguerre::ck ( unsigned int  k) const
overrideprivatevirtual

Implement \(c_k(x)\).

Parameters
[in]kThe order of the polynomial

Implements muq::Approximation::OrthogonalPolynomial.

Definition at line 22 of file Laguerre.cpp.

References a, and nlohmann::detail::dtoa_impl::k.

◆ DerivativeEvaluate()

double Laguerre::DerivativeEvaluate ( int const  polyOrder,
int const  derivOrder,
double const  x 
) const
overridevirtual

Evaluate the \(n^{th}\) derivative of a \(p^{th}\) basis.

Parameters
[in]polyOrderThe integer index \(p\) of the basis.
[in]derivOrderThe order \(n\) of the derivative.
[in]xThe location to evaluate the derivative.
Returns
The the \(n^{th}\) derivative of a \(p^{th}\) basis

Implements muq::Approximation::IndexedScalarBasis.

Definition at line 6 of file Laguerre.cpp.

References a, and Laguerre().

◆ Normalization()

double Laguerre::Normalization ( unsigned int  polyOrder) const
overridevirtual
     @brief Returns the normalization constant for the polynomial of order \f$p\f$.
     @details Many polynomial families are orthogonal with respect to some measure.  This means that for two polynomials \f$P_n(x)\f$ and \f$P_m(x)\f$ in the same family,

\[ \int P_n(x) P_m(x) w(x) dx = a_n \delta_{nm}, \]

where \(\delta_{mn}\) is the Kronecker delta function, \(w(x)\) is a weighting function tied to the polynomial family (e.g., the Askey scheme), and \(a_n\in\mathbb{R}\) is a scalar normalization constant. This function computes the normalization constant \(a_n\). Polynomial families that are not orthogonal do not have a normalizing constant \(a_n\) and will throw an exception if this function is called.

Parameters
[in]polyOrderThe order of the polynomial
Returns
The normalization constant for a particular polynomial family and its weighting function \(w(x)\).

Reimplemented from muq::Approximation::OrthogonalPolynomial.

Definition at line 34 of file Laguerre.cpp.

References a.

◆ phi0()

double Laguerre::phi0 ( double  x) const
overrideprivatevirtual

Implement \(\phi_0(x)\).

Parameters
[in]xThe point where w are evaluating the polynomial

Implements muq::Approximation::OrthogonalPolynomial.

Definition at line 26 of file Laguerre.cpp.

◆ phi1()

double Laguerre::phi1 ( double  x) const
overrideprivatevirtual

Implement \(\phi_1(x)\).

Parameters
[in]xThe point where w are evaluating the polynomial

Implements muq::Approximation::OrthogonalPolynomial.

Definition at line 30 of file Laguerre.cpp.

References a.

Member Data Documentation

◆ a

const double muq::Approximation::Laguerre::a
private

Definition at line 29 of file Laguerre.h.

Referenced by bk(), ck(), DerivativeEvaluate(), Normalization(), and phi1().


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