00001 /* 00002 * flinear.cpp 00003 * 00004 * Created on: Sep 14, 2008 00005 * Author: marcosm 00006 */ 00007 00008 #include "flinear.h" 00009 00010 FLinear::FLinear(double a, double b) 00011 { 00012 m_a = a; 00013 m_b = b; 00014 } 00015 00016 double FLinear::value(const Point<1> & p, const unsigned int component) const 00017 { 00018 assert(component==0); 00019 return p[0]*m_a + m_b; 00020 } 00021 00022 FLinear::~FLinear() 00023 { 00024 // TODO Auto-generated destructor stub 00025 } 00026 00027 double FLinear::operator ()(double dd, unsigned cmp) const 00028 { 00029 assert(cmp == 0); 00030 return dd*m_a + m_b; 00031 } 00032 00033 00034 00035 00036 00037 00038 00039 00040 void FLinear::getMinMaxValues(double a, double b,double &min,double &max) const 00041 { 00042 min=(*this)(a); 00043 max=(*this)(b); 00044 if (m_a < 0.0) 00045 { 00046 std::swap(min,max); 00047 } 00048 } 00049 00050 00051 void FLinear::setParameters(const VecDouble ¶meters) 00052 { 00053 return; 00054 }