Sundance::UnaryFunctor Class Reference

Inheritance diagram for Sundance::UnaryFunctor:

Sundance::PowerFunctor

List of all members.

Public Member Functions

 UnaryFunctor (const std::string &name, const RCP< FunctorDomain > &domain=rcp(new UnboundedDomain()))
virtual ~UnaryFunctor ()
const std::string & name () const
virtual void eval0 (const double *const x, int nx, double *f) const =0
virtual void eval1 (const double *const x, int nx, double *f, double *df_dx) 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
void evalFDDerivs1 (const double *const x, int nx, double *f, double *df_dx) const
void evalFDDerivs2 (const double *const x, int nx, double *f, double *df_dx, double *d2f_dxx) const
void evalFDDerivs3 (const double *const x, int nx, double *f, double *df_dx, double *d2f_dxx, double *d3f_dxxx) const
bool testDerivs (const double &x, const double &tol) const
bool testInvalidValue (const double &xBad) const
bool test (int nx, const double &tol) const
const RCP< FunctorDomain > & domain () const

Static Public Member Functions

static bool & checkResults ()
static double & fdStep ()

Private Attributes

std::string name_
double h_
RCP< FunctorDomaindomain_


Detailed Description

Definition at line 52 of file SundanceUnaryFunctor.hpp.


Constructor & Destructor Documentation

Sundance::UnaryFunctor::UnaryFunctor ( const std::string &  name,
const RCP< FunctorDomain > &  domain = rcp(new UnboundedDomain()) 
) [inline]

ctor

Definition at line 56 of file SundanceUnaryFunctor.hpp.

virtual Sundance::UnaryFunctor::~UnaryFunctor (  )  [inline, virtual]

Definition at line 62 of file SundanceUnaryFunctor.hpp.


Member Function Documentation

static bool& Sundance::UnaryFunctor::checkResults (  )  [inline, static]

Specify whether we should test for NAN or INFINITE results.

Definition at line 124 of file SundanceUnaryFunctor.hpp.

Referenced by Sundance::PowerFunctor::eval0(), Sundance::PowerFunctor::eval1(), Sundance::PowerFunctor::eval2(), and Sundance::PowerFunctor::eval3().

const RCP<FunctorDomain>& Sundance::UnaryFunctor::domain (  )  const [inline]

Definition at line 128 of file SundanceUnaryFunctor.hpp.

References domain_.

Referenced by test().

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

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

Reimplemented in Sundance::PowerFunctor.

Definition at line 38 of file SundanceUnaryFunctor.cpp.

References evalFDDerivs1().

Referenced by Sundance::EvalVector::applyUnaryOperator(), and testDerivs().

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

Reimplemented in Sundance::PowerFunctor.

Definition at line 47 of file SundanceUnaryFunctor.cpp.

References evalFDDerivs2().

Referenced by Sundance::EvalVector::applyUnaryOperator(), and testDerivs().

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

Reimplemented in Sundance::PowerFunctor.

Definition at line 56 of file SundanceUnaryFunctor.cpp.

References evalFDDerivs3().

void UnaryFunctor::evalFDDerivs1 ( const double *const   x,
int  nx,
double *  f,
double *  df_dx 
) const

Definition at line 67 of file SundanceUnaryFunctor.cpp.

References eval0(), and h_.

Referenced by eval1(), and testDerivs().

void UnaryFunctor::evalFDDerivs2 ( const double *const   x,
int  nx,
double *  f,
double *  df_dx,
double *  d2f_dxx 
) const

Definition at line 94 of file SundanceUnaryFunctor.cpp.

References eval0(), and h_.

Referenced by eval2(), and testDerivs().

void UnaryFunctor::evalFDDerivs3 ( const double *const   x,
int  nx,
double *  f,
double *  df_dx,
double *  d2f_dxx,
double *  d3f_dxxx 
) const

Definition at line 125 of file SundanceUnaryFunctor.cpp.

References eval0(), and h_.

Referenced by eval3().

static double& Sundance::UnaryFunctor::fdStep (  )  [inline, static]

Definition at line 126 of file SundanceUnaryFunctor.hpp.

const std::string& Sundance::UnaryFunctor::name (  )  const [inline]

bool UnaryFunctor::test ( int  nx,
const double &  tol 
) const

Definition at line 283 of file SundanceUnaryFunctor.cpp.

References domain(), Playa::Out::os(), testDerivs(), and testInvalidValue().

bool UnaryFunctor::testDerivs ( const double &  x,
const double &  tol 
) const

Definition at line 159 of file SundanceUnaryFunctor.cpp.

References eval1(), eval2(), evalFDDerivs1(), evalFDDerivs2(), h_, name(), and Playa::Out::os().

Referenced by test(), and testInvalidValue().

bool UnaryFunctor::testInvalidValue ( const double &  xBad  )  const

Definition at line 253 of file SundanceUnaryFunctor.cpp.

References name(), Playa::Out::os(), and testDerivs().

Referenced by test().


Member Data Documentation

Definition at line 135 of file SundanceUnaryFunctor.hpp.

Referenced by domain().

double Sundance::UnaryFunctor::h_ [private]

Definition at line 133 of file SundanceUnaryFunctor.hpp.

Referenced by evalFDDerivs1(), evalFDDerivs2(), evalFDDerivs3(), and testDerivs().

std::string Sundance::UnaryFunctor::name_ [private]

Definition at line 131 of file SundanceUnaryFunctor.hpp.

Referenced by name().

Site Contact