SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ResidualEstimator.icpp
Go to the documentation of this file.
1 
23 namespace ModelFitting {
24 
25 template <typename DoubleIter>
26 void ResidualEstimator::populateResiduals(DoubleIter output_iter) const {
27  // In the general case we use an intermediate vector
28  std::vector<double> residuals (m_residual_no, 0.);
29  auto residuals_ptr = residuals.data();
30  for (auto& block_prov_ptr : m_block_provider_list) {
31  block_prov_ptr->populateResidualBlock(residuals_ptr);
32  residuals_ptr += block_prov_ptr->numberOfResiduals();
33  }
34  std::copy(residuals.begin(), residuals.end(), output_iter);
35 }
36 
37 } // end of namespace ModelFitting
std::vector< std::unique_ptr< ResidualBlockProvider > > m_block_provider_list
T copy(T...args)
void populateResiduals(DoubleIter output_iter) const
T end(T...args)
T data(T...args)
T begin(T...args)