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
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.
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t Func __host__ __device__ V int Func func
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.
std::vector< double > parameters