Sundance::PowerFunctor Class Reference

Inheritance diagram for Sundance::PowerFunctor:

Sundance::UnaryFunctor

List of all members.

Public Member Functions

 PowerFunctor (const double &p)
virtual void eval1 (const double *const x, int nx, double *f, double *df) const
virtual void eval0 (const double *const x, int nx, double *f) const
virtual void eval2 (const double *const x, int nx, double *f, double *df_dx, double *d2f_dxx) const
virtual void eval3 (const double *const x, int nx, double *f, double *df_dx, double *d2f_dxx, double *d3f_dxxx) const

Static Public Member Functions

static RCP< FunctorDomainpowerDomain (const double &p)

Protected Member Functions

bool acceptX (int diffOrder, const double &x) const

Private Attributes

double p_
bool powerIsInteger_


Detailed Description

Definition at line 47 of file SundanceStdMathFunctors.hpp.


Constructor & Destructor Documentation

PowerFunctor::PowerFunctor ( const double &  p  ) 

Definition at line 40 of file SundanceStdMathFunctors.cpp.


Member Function Documentation

bool Sundance::PowerFunctor::acceptX ( int  diffOrder,
const double &  x 
) const [inline, protected]

Definition at line 79 of file SundanceStdMathFunctors.hpp.

References p_, and powerIsInteger_.

Referenced by eval0(), eval1(), eval2(), and eval3().

void PowerFunctor::eval0 ( const double *const   x,
int  nx,
double *  f 
) const [virtual]

Evaluate power function at an array of values

Implements Sundance::UnaryFunctor.

Definition at line 314 of file SundanceStdMathFunctors.cpp.

References acceptX(), Sundance::UnaryFunctor::checkResults(), Sundance::UnaryFunctor::name(), p_, and Sundance::pow().

void PowerFunctor::eval1 ( const double *const   x,
int  nx,
double *  f,
double *  df 
) const [virtual]

Evaluate power function and deriv at an array of values

Reimplemented from Sundance::UnaryFunctor.

Definition at line 70 of file SundanceStdMathFunctors.cpp.

References acceptX(), Sundance::UnaryFunctor::checkResults(), Sundance::UnaryFunctor::name(), p_, and Sundance::pow().

void PowerFunctor::eval2 ( const double *const   x,
int  nx,
double *  f,
double *  df_dx,
double *  d2f_dxx 
) const [virtual]

Evaluate power function and first two derivs at an array of values

Reimplemented from Sundance::UnaryFunctor.

Definition at line 235 of file SundanceStdMathFunctors.cpp.

References acceptX(), Sundance::UnaryFunctor::checkResults(), Sundance::UnaryFunctor::name(), p_, and Sundance::pow().

void PowerFunctor::eval3 ( const double *const   x,
int  nx,
double *  f,
double *  df_dx,
double *  d2f_dxx,
double *  d3f_dxxx 
) const [virtual]

Evaluate power function and first three derivs at an array of values

Reimplemented from Sundance::UnaryFunctor.

Definition at line 142 of file SundanceStdMathFunctors.cpp.

References acceptX(), Sundance::UnaryFunctor::checkResults(), Sundance::UnaryFunctor::name(), p_, and Sundance::pow().

RCP< FunctorDomain > PowerFunctor::powerDomain ( const double &  p  )  [static]

Definition at line 47 of file SundanceStdMathFunctors.cpp.

References Sundance::UnboundedDomain().


Member Data Documentation

double Sundance::PowerFunctor::p_ [private]

Definition at line 93 of file SundanceStdMathFunctors.hpp.

Referenced by acceptX(), eval0(), eval1(), eval2(), and eval3().

Definition at line 94 of file SundanceStdMathFunctors.hpp.

Referenced by acceptX().

Site Contact