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< FunctorDomain > | domain_ |
Definition at line 63 of file SundanceUnaryFunctor.hpp.
| Sundance::UnaryFunctor::UnaryFunctor | ( | const std::string & | name, |
| const RCP< FunctorDomain > & | domain = rcp(new UnboundedDomain()) |
||
| ) | [inline] |
ctor
Definition at line 67 of file SundanceUnaryFunctor.hpp.
| virtual Sundance::UnaryFunctor::~UnaryFunctor | ( | ) | [inline, virtual] |
Definition at line 73 of file SundanceUnaryFunctor.hpp.
| static bool& Sundance::UnaryFunctor::checkResults | ( | ) | [inline, static] |
Specify whether we should test for NAN or INFINITE results.
Definition at line 135 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] |
| virtual void Sundance::UnaryFunctor::eval0 | ( | const double *const | x, |
| int | nx, | ||
| double * | f | ||
| ) | const [pure virtual] |
Implemented in Sundance::PowerFunctor.
Referenced by Sundance::EvalVector::applyUnaryOperator(), evalFDDerivs1(), evalFDDerivs2(), and evalFDDerivs3().
| void UnaryFunctor::eval1 | ( | const double *const | x, |
| int | nx, | ||
| double * | f, | ||
| double * | df_dx | ||
| ) | const [virtual] |
Reimplemented in Sundance::PowerFunctor.
Definition at line 49 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 58 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 67 of file SundanceUnaryFunctor.cpp.
References evalFDDerivs3().
| void UnaryFunctor::evalFDDerivs1 | ( | const double *const | x, |
| int | nx, | ||
| double * | f, | ||
| double * | df_dx | ||
| ) | const |
Definition at line 78 of file SundanceUnaryFunctor.cpp.
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 105 of file SundanceUnaryFunctor.cpp.
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 136 of file SundanceUnaryFunctor.cpp.
Referenced by eval3().
| static double& Sundance::UnaryFunctor::fdStep | ( | ) | [inline, static] |
Definition at line 137 of file SundanceUnaryFunctor.hpp.
Referenced by Sundance::NonlinearUnaryOpEvaluator::evalArgDerivs().
| const std::string& Sundance::UnaryFunctor::name | ( | ) | const [inline] |
Definition at line 76 of file SundanceUnaryFunctor.hpp.
References name_.
Referenced by Sundance::EvalVector::applyUnaryOperator(), Sundance::PowerFunctor::eval0(), Sundance::PowerFunctor::eval1(), Sundance::PowerFunctor::eval2(), Sundance::PowerFunctor::eval3(), testDerivs(), and testInvalidValue().
| bool UnaryFunctor::test | ( | int | nx, |
| const double & | tol | ||
| ) | const |
Definition at line 294 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 170 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 264 of file SundanceUnaryFunctor.cpp.
References name(), Playa::Out::os(), and testDerivs().
Referenced by test().
RCP<FunctorDomain> Sundance::UnaryFunctor::domain_ [private] |
Definition at line 146 of file SundanceUnaryFunctor.hpp.
Referenced by domain().
double Sundance::UnaryFunctor::h_ [private] |
Definition at line 144 of file SundanceUnaryFunctor.hpp.
Referenced by evalFDDerivs1(), evalFDDerivs2(), evalFDDerivs3(), and testDerivs().
std::string Sundance::UnaryFunctor::name_ [private] |
Definition at line 142 of file SundanceUnaryFunctor.hpp.
Referenced by name().