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