19 const std::vector<SamplePoint> & sample_point,
20 const unsigned int & first_point,
21 const unsigned int & last_point,
28 if (first_point<1 || first_point>sample_point.size()) {
29 throw std::runtime_error(Form(
"File: %s, Line: %d\nBaseFunctionFitter::fit_parameters() - ERROR: Illegal first point %d, must be >=1 and <=%lu", __FILE__, __LINE__, first_point, sample_point.size()));
31 if (last_point<first_point || last_point>sample_point.size()) {
32 throw std::runtime_error(Form(
"File: %s, Line: %d\nBaseFunctionFitter::fit_parameters() - ERROR: Illegal last point %d, must be >=%d and <=%lu", __FILE__, __LINE__, last_point, first_point, sample_point.size()));
45 for (
unsigned int k=first_point-1;
k<last_point;
k++) {
46 m_A.fillSymmetric(j,
p,
m_A(j,
p)+base_function->
value(j,sample_point[
k].x1())
47 *base_function->
value(
p,sample_point[
k].x1())/
54 for (
unsigned int k=first_point-1;
k<last_point;
k++) {
55 m_b[j] =
m_b[j]+sample_point[
k].x2()*
56 base_function->
value(j,
57 sample_point[
k].
x1())/