25 #ifndef UQ_1D_1D_FUNCTION_H 
   26 #define UQ_1D_1D_FUNCTION_H 
   28 #include <queso/ScalarSequence.h> 
   29 #include <queso/1DQuadrature.h> 
   30 #include <queso/Environment.h> 
   31 #include <queso/Defines.h> 
   60                           double maxDomainValue);
 
   68   double minDomainValue() 
const;
 
   72   double maxDomainValue() 
const;
 
   75   virtual  double value         (
double domainValue) 
const = 0;
 
   78   virtual  double deriv         (
double domainValue) 
const = 0;
 
   82   virtual  double multiplyAndIntegrate(
const Base1D1DFunction& func, 
unsigned int quadratureOrder, 
double* resultWithMultiplicationByTAsWell) 
const;
 
  104                              double (*valueRoutinePtr)(
double domainValue, 
const void* routinesDataPtr),
 
  105                              double (*derivRoutinePtr)(
double domainValue, 
const void* routinesDataPtr),
 
  106                              const void* routinesDataPtr);
 
  116   double value(
double domainValue) 
const;
 
  121   double deriv(
double domainValue) 
const;
 
  147                               double constantValue);
 
  158   double value(
double domainValue) 
const;
 
  163   double deriv(
double domainValue) 
const;
 
  195                             double referenceDomainValue,
 
  196                             double referenceImageValue,
 
  207   double value(
double domainValue) 
const;
 
  213   double deriv(
double domainValue) 
const;
 
  244                                      const std::vector<double>& referenceDomainValues,
 
  245                                      double                     referenceImageValue0,
 
  246                                      const std::vector<double>& rateValues);
 
  256   double value(
double domainValue) 
const;
 
  261   double deriv(
double domainValue) 
const;
 
  313   double value(
double domainValue) 
const;
 
  319   double deriv(
double domainValue) 
const;
 
  372   virtual double       value(
double domainValue) 
const;
 
  378   double               deriv(
double domainValue) 
const;
 
  390   void    set(
const std::vector<double>& domainValues,
 
  391               const std::vector<double>& imageValues);
 
  438   double value(
double domainValue) 
const;
 
  442   double deriv(
double domainValue) 
const;
 
  479   double value(
double domainValue) 
const;
 
  484   double deriv(
double domainValue) 
const;
 
  521   double value(
double domainValue) 
const;
 
  525   double deriv(
double domainValue) 
const;
 
  564                                         const std::vector<double>* functionValues);
 
  572   double value(
double domainValue) 
const;
 
  578   double deriv(
double domainValue) 
const;
 
  615                                    unsigned int basisIndex);
 
  623   double value(
double domainValue) 
const;
 
  629   double deriv(
double domainValue) 
const;
 
  654 #endif // UQ_1D_1D_FUNCTION_H 
~LagrangeBasis1D1DFunction()
Destructor. 
 
double minDomainValue() const 
Returns the minimum value of the domain of the (one-dimensional) function. 
 
Quadratic1D1DFunction(double minDomainValue, double maxDomainValue, double a, double b, double c)
Default constructor. 
 
LagrangeBasis1D1DFunction(const std::vector< double > &positionValues, unsigned int basisIndex)
Default constructor. 
 
~ScalarTimesFunc1D1DFunction()
Destructor. 
 
Sampled1D1DFunction()
Default constructor. It should not be called by the user. 
 
double value(double domainValue) const 
Returns the value of the (one-dimensional) function at point domainValue, already multiplied by the s...
 
Constant1D1DFunction(double minDomainValue, double maxDomainValue, double constantValue)
Default constructor. 
 
Class for multiplication of a one-dimensional function by another. 
 
Class for piecewise-linear one-dimensional functions. 
 
PiecewiseLinear1D1DFunction(double minDomainValue, double maxDomainValue, const std::vector< double > &referenceDomainValues, double referenceImageValue0, const std::vector< double > &rateValues)
Default constructor. 
 
double deriv(double domainValue) const 
TODO: Returns the value of the derivative of the function multiplied by the given scalar at point dom...
 
double deriv(double domainValue) const 
TODO: Returns the value of the derivative of the addition of two functions. 
 
const void * m_routinesDataPtr
 
std::vector< double > m_referenceImageValues
Reference values in the piecewise-linear function image;  in , for each =1 .. m_numRefValues. 
 
~Linear1D1DFunction()
Destructor. 
 
This (virtual) class sets up the environment underlying the use of the QUESO library by an executable...
 
std::vector< double > m_rateValues
Rate value;  in , for each =1 .. m_numRefValues. 
 
double deriv(double domainValue) const 
Bogus: Derivative of the function. 
 
~FuncPlusFunc1D1DFunction()
Destructor. 
 
Class for one-dimensional Lagrange polynomials. 
 
~FuncTimesFunc1D1DFunction()
Destructor. 
 
virtual double value(double domainValue) const 
Returns the value of the sampled function at point domainValue. 
 
double deriv(double domainValue) const 
TODO: Returns the value of the derivative of the Lagrange basis at point domainValue. 
 
double deriv(double domainValue) const 
TODO: Returns the value of the derivative of the Lagrange polynomial at point domainValue. 
 
double value(double domainValue) const 
Returns the value of the (one-dimensional) function at point domainValue. 
 
ScalarTimesFunc1D1DFunction(double scalar, const Base1D1DFunction &func)
Default constructor. 
 
~PiecewiseLinear1D1DFunction()
Destructor. 
 
std::vector< double > m_positionValues
 
const Base1D1DFunction & m_func1
 
Class for generic one-dimensional functions. 
 
const Base1D1DFunction & m_func2
 
Class for handling scalar samples. 
 
const Base1D1DFunction & m_func1
 
const Base1D1DFunction & m_func
 
~Generic1D1DFunction()
Destructor. 
 
double SubF1F2Gaussian2dKdeIntegral(const ScalarSequence< T > &scalarSeq1, const ScalarSequence< T > &scalarSeq2, unsigned int initialPos, double scaleValue1, double scaleValue2, const Base1D1DFunction &func1, const Base1D1DFunction &func2, unsigned int quadratureOrder)
Calculates the integral of a 2D Gaussian KDE. 
 
double deriv(double domainValue) const 
Returns the value of the derivative of the piecewise-linear function at point domainValue. 
 
FuncPlusFunc1D1DFunction(const Base1D1DFunction &func1, const Base1D1DFunction &func2)
Default constructor. 
 
double(* m_valueRoutinePtr)(double domainValue, const void *routinesDataPtr)
 
double deriv(double domainValue) const 
TODO: Returns the value of the derivative of the function func1 by another function func2 at the poin...
 
Class for linear one-dimensional functions. 
 
Linear1D1DFunction(double minDomainValue, double maxDomainValue, double referenceDomainValue, double referenceImageValue, double rateValue)
Default constructor. 
 
Class for addition of a one-dimensional function with another. 
 
double m_referenceDomainValue
Reference value in the function domain;  in . 
 
Class for Lagrange polynomial basis. 
 
std::vector< double > m_positionValues
 
~Constant1D1DFunction()
Destructor. 
 
~Quadratic1D1DFunction()
Destructor. 
 
FuncTimesFunc1D1DFunction(const Base1D1DFunction &func1, const Base1D1DFunction &func2)
Default constructor. 
 
double value(double domainValue) const 
Returns the value of the constant function at point domainValue. 
 
double value(double domainValue) const 
Returns the value of the Lagrange basis at point domainValue. 
 
void set(const std::vector< double > &domainValues, const std::vector< double > &imageValues)
Sets the values of the independent (domainValues) and dependent (imageValues) variables of this sampl...
 
Class for one-dimensional sampled functions. 
 
Generic1D1DFunction(double minDomainValue, double maxDomainValue, double(*valueRoutinePtr)(double domainValue, const void *routinesDataPtr), double(*derivRoutinePtr)(double domainValue, const void *routinesDataPtr), const void *routinesDataPtr)
Default constructor. 
 
double deriv(double domainValue) const 
Returns the value of the derivative of the constant function at point domainValue. 
 
std::vector< double > m_domainValues
Array of the values in the domain of the function (values of the independent variable). 
 
virtual double value(double domainValue) const =0
Returns the value of the (one-dimensional) function. See template specialization. ...
 
unsigned int m_basisIndex
 
virtual ~Sampled1D1DFunction()
Destructor. 
 
Class for constant one-dimensional functions. 
 
double(* m_derivRoutinePtr)(double domainValue, const void *routinesDataPtr)
 
double value(double domainValue) const 
Returns the value of the piecewise-linear function at point domainValue. 
 
double value(double domainValue) const 
Returns the value of the multiplication of a function func1 by another function func2 at the point do...
 
bool domainValueMatchesExactly(double domainValue) const 
Checks whether the domain value domainValue matches exactly one of the values in the function domain ...
 
LagrangePolynomial1D1DFunction(const std::vector< double > &positionValues, const std::vector< double > *functionValues)
Default constructor. 
 
double value(double domainValue) const 
Returns the value of the Lagrange polynomial at point domainValue. 
 
double deriv(double domainValue) const 
Returns the value of the derivative of the function at point domainValue. 
 
const std::vector< double > & domainValues() const 
Array of the domain values (values of the independent variable). 
 
std::vector< double > m_functionValues
 
double m_rateValue
Rate value;  in . 
 
std::vector< double > m_imageValues
Array of the values in the image of the function (values of the dependent variable). 
 
Class for one-dimensional functions. 
 
const std::vector< double > & imageValues() const 
Array of the image values (values of the dependent variable). 
 
virtual double deriv(double domainValue) const =0
Returns the value of the derivative of the function. See template specialization. ...
 
double value(double domainValue) const 
Returns the value of the linear function at point domainValue. 
 
double value(double domainValue) const 
Returns the value of the addition of function func1 and func2 evaluated at the point domainValue...
 
virtual void printForMatlab(const BaseEnvironment &env, std::ofstream &ofsvar, const std::string &prefixName) const 
Prints the values of the function in Matlab/Octave format. 
 
Class for one-dimensional quadratic functions. 
 
std::vector< double > m_referenceDomainValues
Reference values in the piecewise-linear function domain;  in , for each =1 .. m_numRefValues. 
 
~LagrangePolynomial1D1DFunction()
Destructor. 
 
double maxDomainValue() const 
Returns the maximum value of the domain of the (one-dimensional) function. 
 
const Base1D1DFunction & m_func2
 
double deriv(double domainValue) const 
Returns the value of the derivative of the linear function at point domainValue. 
 
double m_referenceImageValue
Reference value in the function image;  in . 
 
unsigned int m_numRefValues
Number of points which will be evaluated. 
 
Class for multiplication of a one-dimensional function by a scalar.