You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
#include "Attractor.hpp"
|
|
|
|
#include "Logger.hpp"
|
|
#include <cstdlib>
|
|
#include "stfu/stf.hpp"
|
|
|
|
#include "AttractorKernel.hpp"
|
|
#include "Projector.hpp"
|
|
|
|
Attractor::Attractor() :
|
|
kernel(0), projector(0) {
|
|
stfu::node kernel_node;
|
|
switch(rand()%2+1){
|
|
case 0:
|
|
kernel_node.value("type") = "lorenz";
|
|
kernel_node.value("dimensions") = "3";
|
|
break;
|
|
/*case 1:
|
|
kernel_node.value("type") = "polynomial";
|
|
kernel_node.value("dimensions") = std::string() + (char)(rand()%3 + '2');
|
|
kernel_node.value("orde") = std::string() + (char)(rand()%5 + '1');
|
|
break;*/
|
|
case 1:
|
|
kernel_node.value("type") = "polynomial a";
|
|
kernel_node.value("dimensions") = "3";
|
|
break;
|
|
/*case 3:
|
|
kernel_node.value("type") = "logistic";
|
|
kernel_node.value("dimensions") = std::string() + (char)(rand()%3 + '2');
|
|
break;*/
|
|
case 2:
|
|
kernel_node.value("type") = "unravel";
|
|
kernel_node.value("dimensions") = "3";
|
|
break;
|
|
}
|
|
|
|
kernel = AttractorKernel::createAttractorKernel(kernel_node);
|
|
kernel->generate_random_parameters();
|
|
|
|
stfu::node projector_node;
|
|
|
|
projector = Projector::createProjector(projector_node, kernel->getDimension());
|
|
}
|
|
|
|
|