19 max_size(default_max_size),
20 automatic_size(false),
36 ASSERT(bound_a != bound_b,
"Bounds overlap.");
37 ASSERT(bound_a < bound_b,
"a must be lower and b must be upper bound.");
53 ASSERT(size >0,
"Size of interpolation table must be positive number!.");
69 ASSERT(init_size >0,
"Maximal size of interpolation table must be positive number!.");
70 ASSERT(max_size >= init_size,
"Maximal size of interpolation table is smaller than initial size.");
100 bool reinterpolate =
false;
105 reinterpolate =
true;
111 reinterpolate =
true;
116 xprintf(
Msg,
"Interpolation: Reinterpolating...\n");
147 interpolate_derivative(false)
170 f[i] = f[i] * this->
fact(i);
179 unsigned int result = 10;
227 xprintf(
Msg,
"Interpolation: Size of the table set automaticaly to: %d after %d cycles.\n",
size_,k);
246 xprintf(
Warn,
"Interpolation: User defined tolerance %E has not been satisfied with size of interpolation table %d.\n",
user_tol,
size_);
262 xprintf(
Msg,
"Interpolation: Interpolation error estimate is: %E.\n",
error_);
337 for(
unsigned int i = 0; i <
size_; i++)
342 f_vec[i] = value.first;
353 for(
unsigned int i = 0; i <
size_; i++)
365 double new_size = 2*
size_;
375 for(
unsigned int i=0; i!=
size_; i++)
377 swap_f_vec.push_back(
f_vec[i]);
378 swap_f_vec.push_back(f[i]);
380 swap_f_vec.push_back(
f_vec.back());
386 for(
unsigned int i=0; i!=
size_; i++)
388 swap_df_vec.push_back(
df_vec[i]);
389 swap_df_vec.push_back(df[i]);
391 swap_df_vec.push_back(
df_vec.back());
406 double temp_x = temp_a;
414 for(
unsigned int i = 0; i !=
size_; i++)
417 temp_x = temp_a +
step*i;
419 f.push_back(value.first);
420 df.push_back(value.second);
424 tot_err = std::max( tot_err,
425 std::abs(value.first - int_value.first) / (std::abs(value.first) + tol)
426 + std::abs(value.second - int_value.second) / (std::abs(value.second) + tol)
435 for(
unsigned int i = 0; i !=
size_; i++)
437 temp_x = temp_a +
step*i;
438 f.push_back(
f_val(temp_x));
439 tot_err = std::max( tot_err,
440 std::abs(f.back() -
val_p1(temp_x)) / (std::abs(f.back()) + tol)
509 for(
unsigned long i = 0; i <
size_; i++ )
522 tot_err = std::pow(tot_err, 1.0/exponent);
536 interpolate_derivative(false),
537 explicit_interpolant(NULL),
559 return func_u->operator()(u);