23 std::vector<int>::const_iterator
id =
functionId_.begin();
61 typename std::vector<T*>::const_iterator funcIt = functionVec_.begin();
62 for( ; funcIt != functionVec_.end(); ++funcIt ) {
63 totParNums += (*funcIt)->parNum();
66 int functionVecSize = functionVec_.size();
68 std::cout <<
"Error: inconsistent number of functions("<<functionVecSize<<
") and iterations("<<
iterationNum_+1<<
")" << std::endl;
71 else if( totParNums != parVecVecSize ) {
72 std::cout <<
"Error: inconsistent total number of requested parameters("<<totParNums<<
") and parameters read("<<parVecVecSize<<
")" << std::endl;
89 function_ =
new T*[functionVecSize];
90 typename std::vector<T * >::const_iterator func = functionVec_.begin();
91 std::vector<double>::const_iterator parVec =
parVecVec_.begin();
93 int iterationCounter = 0;
94 for( ; func != functionVec_.end(); ++func, ++iterationCounter ) {
97 int parNum = (*func)->parNum();
98 parArray_[iterationCounter] =
new double[parNum];
113 function_[iterationCounter] = *func;
117 #endif // BaseFunction_h
BaseFunction(const MuScleFitDBobject *dbObject)
Constructor when receiving database parameters.
std::vector< int > identifiers() const
Return the vector of function identifiers.
std::vector< double > parVecVec_
void convertToArrays(T **&function_, const std::vector< T * > &functionVec_)
Convert vectors to arrays for faster random access. The first pointer is replaced, thus it is taken by reference.
std::vector< double > fitQuality() const
Return the vector of fit quality values.
std::vector< double > fitQuality_
double ** fitQualityArray_
std::vector< int > identifiers
std::vector< int > functionId_
std::vector< double > parameters() const
Return the vector of parameters.
const double par[8 *NPar][4]
std::vector< double > parameters