#include <sfunctions.h>
Public Member Functions | |
VectorFunction (GeneralFunctionInterface *f1, GeneralFunctionInterface *f2, bool del=false) | |
virtual bool | isInDomain (const VecDouble &p, unsigned component=0) |
virtual double | operator() (const VecDouble &p, unsigned int component=0) const |
virtual | ~VectorFunction () |
Private Attributes | |
std::vector < GeneralFunctionInterface * > | vFunctions |
int | m_nComponents |
bool | m_delete |
Definition at line 16 of file sfunctions.h.
VectorFunction::VectorFunction | ( | GeneralFunctionInterface * | f1, | |
GeneralFunctionInterface * | f2, | |||
bool | del = false | |||
) | [inline] |
Definition at line 23 of file sfunctions.h.
00024 :GeneralFunctionInterface(f1->getDomainDim(),2) 00025 { 00026 assert(f1->getDomainDim() == f2->getDomainDim()); 00027 assert(f1->getImageDim() ==1); 00028 assert(f2->getImageDim() ==1); 00029 vFunctions.push_back(f1); 00030 vFunctions.push_back(f2); 00031 m_nComponents=2; 00032 m_delete=del; 00033 }
virtual VectorFunction::~VectorFunction | ( | ) | [inline, virtual] |
Definition at line 46 of file sfunctions.h.
00047 { 00048 for (unsigned i=0;i<vFunctions.size();i++) 00049 { 00050 delete vFunctions[i]; 00051 } 00052 }
virtual bool VectorFunction::isInDomain | ( | const VecDouble & | p, | |
unsigned | component = 0 | |||
) | [inline, virtual] |
Definition at line 36 of file sfunctions.h.
00037 { 00038 assert(component < getImageDim()); 00039 return vFunctions[component]->isInDomain(p); 00040 }
virtual double VectorFunction::operator() | ( | const VecDouble & | p, | |
unsigned int | component = 0 | |||
) | const [inline, virtual] |
Implements GeneralFunctionInterface.
Definition at line 41 of file sfunctions.h.
00042 { 00043 assert(component < getImageDim()); 00044 return (*(vFunctions[component]))(p); 00045 }
bool VectorFunction::m_delete [private] |
Definition at line 20 of file sfunctions.h.
int VectorFunction::m_nComponents [private] |
Definition at line 19 of file sfunctions.h.
std::vector<GeneralFunctionInterface *> VectorFunction::vFunctions [private] |
Definition at line 18 of file sfunctions.h.