|
|
@ -9,11 +9,11 @@ |
|
|
|
const static unsigned int dimension = 3; |
|
|
|
const static unsigned int numberOfParameters = 3; |
|
|
|
|
|
|
|
PolynomialA3D::PolynomialA3D(){ |
|
|
|
PolynomialA3D::PolynomialA3D() { |
|
|
|
init(); |
|
|
|
} |
|
|
|
|
|
|
|
void PolynomialA3D::init(){ |
|
|
|
void PolynomialA3D::init() { |
|
|
|
myParameters = new double[numberOfParameters]; |
|
|
|
vectorNew = new double[dimension]; |
|
|
|
vectorOld = new double[dimension]; |
|
|
@ -29,6 +29,21 @@ void PolynomialA3D::init(){ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void PolynomialA3D::iterate() { |
|
|
|
swap(vectorNew, vectorOld); |
|
|
|
|
|
|
|
vectorNew[0] = myParameters[0] + vectorOld[1] - vectorOld[1]*vectorOld[2]; |
|
|
|
vectorNew[1] = myParameters[1] + vectorOld[2] - vectorOld[2]*vectorOld[0]; |
|
|
|
vectorNew[2] = myParameters[2] + vectorOld[0] - vectorOld[0]*vectorOld[1]; |
|
|
|
} |
|
|
|
/*
|
|
|
|
N dimensional: |
|
|
|
for ( unsigned int i = 0; i < dim; i++ ) { |
|
|
|
new_point[i] = param[i] + point[(i+1) % dim] - point[(i+1) % dim]*point[(i+2) % dim]; |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// setters, getters, all i/o to other classes/objects
|
|
|
|
void * PolynomialA3D::getProperty(const string identifier) { |
|
|
|
if ( identifier == "dimension" ) { |
|
|
|