|
|
@ -57,6 +57,8 @@ void Polynomial::calculateNumberOfParameters(){ |
|
|
|
} |
|
|
|
|
|
|
|
void Polynomial::iterate() { |
|
|
|
swap(vectorNew, vectorOld); |
|
|
|
|
|
|
|
unsigned int m = 0; |
|
|
|
for ( unsigned int i = 0; i < dim; i++ ) { |
|
|
|
|
|
|
@ -64,7 +66,7 @@ void Polynomial::iterate() { |
|
|
|
cout << "Entering new dimension: " << i << " With m = " << m << endl; |
|
|
|
#endif |
|
|
|
|
|
|
|
new_point[i] = param[m]; |
|
|
|
vectorNew[i] = myParameters[m]; |
|
|
|
m++; |
|
|
|
recur(i, 0, 1, m); |
|
|
|
} |
|
|
@ -81,8 +83,8 @@ void Polynomial::recur(unsigned int curr_dimension, unsigned int prev_i, unsigne |
|
|
|
cout << "Calculation in dimension: " << i << " With m = " << m << " And depth = " << n << endl; |
|
|
|
#endif |
|
|
|
|
|
|
|
product = prev_product * point[i]; |
|
|
|
new_point[curr_dimension] += param[m] * product; |
|
|
|
product = prev_product * vectorOld[i]; |
|
|
|
vectorNew[curr_dimension] += myParameters[m] * product; |
|
|
|
m++; |
|
|
|
if (n < orde) { |
|
|
|
recur(curr_dimension, i, n+1, m, product); |
|
|
|