Dune Core Modules (2.8.0)

Dune::Functions::Polynomial< K > Class Template Reference

A scalar polynomial implementation. More...

#include <dune/functions/analyticfunctions/polynomial.hh>

Public Member Functions

 Polynomial ()=default
 Default constructor.
 
 Polynomial (const Polynomial &other)=default
 Copy constructor.
 
 Polynomial (Polynomial &&other)=default
 Move constructor.
 
Polynomialoperator= (const Polynomial &other)=default
 Copy-assignment operator.
 
Polynomialoperator= (Polynomial &&other)=default
 Move-assignment operator.
 
 Polynomial (std::initializer_list< K > coefficients)
 Create from list of coefficients. More...
 
 Polynomial (std::vector< K > &&coefficients)
 Create from list of coefficients. More...
 
 Polynomial (const std::vector< K > &coefficients)
 Create from list of coefficients. More...
 
operator() (const K &x) const
 Evaluate polynomial.
 
const std::vector< K > & coefficients () const
 Obtain reference to coefficient vector.
 

Detailed Description

template<class K>
class Dune::Functions::Polynomial< K >

A scalar polynomial implementation.

Template Parameters
KScalar type. The polynomial will map K to K

This class exists mainly to demonstrate how to implement the Concept::DifferentiableFunction<Range(Domain), DerivativeTraits> concept.

Constructor & Destructor Documentation

◆ Polynomial() [1/3]

template<class K >
Dune::Functions::Polynomial< K >::Polynomial ( std::initializer_list< K >  coefficients)
inline

Create from list of coefficients.

Coefficients are ordered in accordance with the corresponding monomial order

◆ Polynomial() [2/3]

template<class K >
Dune::Functions::Polynomial< K >::Polynomial ( std::vector< K > &&  coefficients)
inline

Create from list of coefficients.

Coefficients are ordered in accordance with the corresponding monomial order. This will move the coefficients from givven vector.

◆ Polynomial() [3/3]

template<class K >
Dune::Functions::Polynomial< K >::Polynomial ( const std::vector< K > &  coefficients)
inline

Create from list of coefficients.

Coefficients are ordered in accordance with the corresponding monomial order. This will copy coefficients from given vector.


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)