51 typename std::vector<T*>::const_iterator funcIt = functionVec_.begin();
52 for (; funcIt != functionVec_.end(); ++funcIt) {
53 totParNums += (*funcIt)->parNum();
56 int functionVecSize = functionVec_.size();
58 std::cout <<
"Error: inconsistent number of functions(" << functionVecSize <<
") and iterations("
61 }
else if (totParNums != parVecVecSize) {
62 std::cout <<
"Error: inconsistent total number of requested parameters(" << totParNums <<
") and parameters read("
63 << parVecVecSize <<
")" << std::endl;
80 function_ =
new T*[functionVecSize];
81 typename std::vector<T*>::const_iterator
func = functionVec_.begin();
82 std::vector<double>::const_iterator parVec =
parVecVec_.begin();
84 int iterationCounter = 0;
85 for (;
func != functionVec_.end(); ++
func, ++iterationCounter) {
87 int parNum = (*func)->parNum();
88 parArray_[iterationCounter] =
new double[parNum];
89 for (
int par = 0; par < parNum; ++par) {
90 parArray_[iterationCounter][par] = *parVec;
103 function_[iterationCounter] = *
func;
107 #endif // BaseFunction_h