Browse Source

merge

master
Joshua Moerman 14 years ago
parent
commit
d394c49efa
  1. 1
      Attractor.hpp
  2. 3
      Projector.cpp
  3. 14
      attractors/coolIkeda.stf
  4. 8
      attractors/emptyIkeda3D.stf
  5. 3
      attractors/emptyLogistic2D.stf
  6. 3
      attractors/emptyLogistic3D.stf
  7. 1
      attractors/emptyLogistic4D.stf
  8. 1
      attractors/emptyLorenz3D.stf
  9. 1
      attractors/emptyPolynomial3D2.stf
  10. 1
      attractors/emptyPolynomial3D3.stf
  11. 1
      attractors/emptyPolynomialA3D.stf
  12. 1
      attractors/emptyUnravel3D.stf
  13. 13
      kernels/Ikeda3D.hpp
  14. 2
      kernels/Logistic.hpp

1
Attractor.hpp

@ -35,6 +35,7 @@ public:
if(kernel->convergent() || kernel->divergent()){ if(kernel->convergent() || kernel->divergent()){
kernel->generate_random_parameters(); kernel->generate_random_parameters();
LogDebug("Generating new parameters.\n"); LogDebug("Generating new parameters.\n");
i = 0;
} }
} }
} }

3
Projector.cpp

@ -4,7 +4,8 @@
#include "projectors/Normalizer.hpp" #include "projectors/Normalizer.hpp"
Projector* Projector::createProjector(stfu::node& projector, unsigned int input_dimension) { Projector* Projector::createProjector(stfu::node& projector, unsigned int input_dimension) {
Projector* output = new Normalizer(input_dimension); //Projector* output = new Normalizer(input_dimension);
Projector* output = new Normalizer(2);
return output; return output;
} }

14
attractors/coolIkeda.stf

@ -0,0 +1,14 @@
AttractorKernel: {
type: "ikeda"
dimensions: "3"
parameters: {
: "2.98"
: "0.99"
: "3.26"
: "47.74"
}
}
Projector: "Projector"
Projector: {
}

8
attractors/emptyIkeda3D.stf

@ -0,0 +1,8 @@
AttractorKernel: {
type: "ikeda"
dimensions: "3"
}
Projector: "Projector"
Projector: {
}

3
attractors/emptyLogistic2D.stf

@ -2,6 +2,9 @@ AttractorKernel: {
type: "logistic" type: "logistic"
dimensions: "2" dimensions: "2"
} }
Projector: "Projector"
Projector: { Projector: {
} }

3
attractors/emptyLogistic3D.stf

@ -2,6 +2,9 @@ AttractorKernel: {
type: "logistic" type: "logistic"
dimensions: "3" dimensions: "3"
} }
Projector: "Projector"
Projector: { Projector: {
} }

1
attractors/emptyLogistic4D.stf

@ -2,6 +2,7 @@ AttractorKernel: {
type: "logistic" type: "logistic"
dimensions: "4" dimensions: "4"
} }
Projector : "Projector"
Projector: { Projector: {
} }

1
attractors/emptyLorenz3D.stf

@ -2,6 +2,7 @@ AttractorKernel: {
type: "lorenz" type: "lorenz"
dimensions: "3" dimensions: "3"
} }
Projector: "Projector"
Projector: { Projector: {
} }

1
attractors/emptyPolynomial3D2.stf

@ -3,6 +3,7 @@ AttractorKernel: {
dimensions: "3" dimensions: "3"
orde: "2" orde: "2"
} }
Projector: "Projector"
Projector: { Projector: {
} }

1
attractors/emptyPolynomial3D3.stf

@ -3,6 +3,7 @@ AttractorKernel: {
dimensions: "3" dimensions: "3"
orde: "3" orde: "3"
} }
Projector: "Projector"
Projector: { Projector: {
} }

1
attractors/emptyPolynomialA3D.stf

@ -2,6 +2,7 @@ AttractorKernel: {
type: "polynomial a" type: "polynomial a"
dimensions: "3" dimensions: "3"
} }
Projector: "Projector"
Projector: { Projector: {
} }

1
attractors/emptyUnravel3D.stf

@ -2,6 +2,7 @@ AttractorKernel: {
type: "unravel" type: "unravel"
dimensions: "3" dimensions: "3"
} }
Projector: "Projector"
Projector: { Projector: {
} }

13
kernels/Ikeda3D.hpp

@ -16,7 +16,7 @@ private:
public: public:
Ikeda3D(): Ikeda3D():
AttractorKernel(3, 1) { AttractorKernel(3, 4) {
init(); init();
} }
@ -24,16 +24,19 @@ public:
virtual void generate_random_parameters() { virtual void generate_random_parameters() {
parameters[0] = rand() / double(RAND_MAX) *2.0 - 0.5; parameters[0] = rand() / double(RAND_MAX) *2.0 - 0.5;
parameters[1] = rand() / double(RAND_MAX) *2.0 - 0.5; // wikipedia: u
parameters[2] = rand() / double(RAND_MAX) *2.0 - 0.5;
parameters[3] = rand() / double(RAND_MAX) *20.0;
init(); init();
} }
virtual void operator()() { virtual void operator()() {
std::swap(vectorNew, vectorOld); std::swap(vectorNew, vectorOld);
vectorOld[2] = 0.4 - 6.0/(1 + vectorOld[0]*vectorOld[0] + vectorOld[1]*vectorNew[1]); vectorOld[2] = parameters[2] - parameters[3]/(1 + vectorOld[0]*vectorOld[0] + vectorOld[1]*vectorNew[1]);
vectorNew[0] = 1 + parameters[0] * (vectorOld[0]*cos(vectorOld[2]) - vectorOld[1]*sin(vectorOld[2])); vectorNew[0] = parameters[0] + parameters[1] * (vectorOld[0]*cos(vectorOld[2]) - vectorOld[1]*sin(vectorOld[2]));
vectorNew[0] = parameters[0] * (vectorOld[0]*sin(vectorOld[2]) + vectorOld[1]*cos(vectorOld[2])); vectorNew[1] = parameters[1] * (vectorOld[0]*sin(vectorOld[2]) + vectorOld[1]*cos(vectorOld[2]));
} }
}; };

2
kernels/Logistic.hpp

@ -29,7 +29,7 @@ public:
virtual void generate_random_parameters() { virtual void generate_random_parameters() {
for(unsigned int i = 0; i < numberOfParameters; ++i) { for(unsigned int i = 0; i < numberOfParameters; ++i) {
parameters[i] = rand() / double(RAND_MAX) + 3.0; parameters[i] = 0.43 * rand() / double(RAND_MAX) + 3.57;
} }
init(); init();
} }