20 #ifndef _BIDIRECTIONAL_FUNCTION_H_
21 #define _BIDIRECTIONAL_FUNCTION_H_
23 #include "mbsim/functions/function.h"
29 template<
typename Ret,
typename Arg>
34 if(fn) fn->setParent(
this);
35 if(fp) fp->setParent(
this);
41 int getArgSize()
const {
42 return fn->getArgSize();
44 Ret operator()(
const Arg &x) {
47 typename B::DRetDArg parDer(
const double &x) {
50 typename B::DRetDArg parDerDirDer(
const Arg &xDir,
const Arg &x) {
53 typename B::DDRetDDArg parDerParDer(
const double &x) {
56 void setNegativeDirectionalFunction(
Function<Ret(Arg)> *fn_) {
59 fn->setName(
"NegativeDirectional");
61 void setPositiveDirectionalFunction(
Function<Ret(Arg)> *fp_) {
64 fp->setName(
"PostiveDirectional");
66 void initializeUsingXML(xercesc::DOMElement *element) {
67 xercesc::DOMElement *e;
68 e=MBXMLUtils::E(element)->getFirstElementChildNamed(MBSIM%
"negativeDirectionalFunction");
70 e=MBXMLUtils::E(element)->getFirstElementChildNamed(MBSIM%
"positiveDirectionalFunction");
InitStage
The stages of the initialization.
Definition: element.h:97
Definition: planar_contour.h:31
void init(Element::InitStage stage)
plots time series header
Definition: bidirectional_function.h:73
virtual void init(InitStage stage)
plots time series header
Definition: element.cc:70
Definition: bidirectional_function.h:27
static ContainerType * createAndInit(const xercesc::DOMElement *element)
Definition: objectfactory.h:87