#include <constvectorfunction.h>
Public Member Functions | |
ConstVectorFunction (double v1, double v2, double v3) | |
virtual double | operator() (const VecDouble &p, const unsigned int component=0) const |
virtual | ~ConstVectorFunction () |
Private Attributes | |
std::vector< double > | m_v |
A constant vector function
Definition at line 19 of file constvectorfunction.h.
ConstVectorFunction::ConstVectorFunction | ( | double | v1, | |
double | v2, | |||
double | v3 | |||
) |
Definition at line 11 of file constvectorfunction.cpp.
00012 :Function3D(3) 00013 { 00014 m_v.resize(3); 00015 m_v[0]=v1; 00016 m_v[1]=v2; 00017 m_v[2]=v3; 00018 }
ConstVectorFunction::~ConstVectorFunction | ( | ) | [virtual] |
Definition at line 20 of file constvectorfunction.cpp.
00021 { 00022 m_v.clear(); 00023 }
double ConstVectorFunction::operator() | ( | const VecDouble & | p, | |
const unsigned int | component = 0 | |||
) | const [virtual] |
Implements GeneralFunctionInterface.
Definition at line 26 of file constvectorfunction.cpp.
00027 { 00028 00029 assert(component < 3); 00030 return m_v[component]; 00031 }
std::vector<double> ConstVectorFunction::m_v [private] |
Definition at line 21 of file constvectorfunction.h.