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.
61 lines
1.3 KiB
61 lines
1.3 KiB
#ifndef ATTRACTOR_HPP
|
|
#define ATTRACTOR_HPP
|
|
|
|
#include <vector>
|
|
|
|
//#include "Vector.hpp"
|
|
//#include "Parameters.hpp"
|
|
#include "Projector.hpp"
|
|
#include "AttractorKernel.hpp"
|
|
|
|
enum FormulaChoice {
|
|
POLY_N, LORENZ, POLY_A, POLY_2, LOGISTIC, UNRAVEL
|
|
};
|
|
|
|
class Projector;
|
|
|
|
// TODO : Verschillende classas AttractorSystem en Attractor maken?
|
|
|
|
class Attractor {
|
|
public:
|
|
unsigned int dim;
|
|
unsigned int par;
|
|
unsigned int orde;
|
|
FormulaChoice formula;
|
|
|
|
double * param;
|
|
double * point;
|
|
double * new_point;
|
|
|
|
|
|
vector<Projector *> projectors;
|
|
|
|
public:
|
|
Attractor();
|
|
Attractor(unsigned int dimensions, FormulaChoice formula, unsigned int orde = 3);
|
|
Attractor(const char* const filename);
|
|
|
|
void init(unsigned int dimensions, FormulaChoice formula, unsigned int orde);
|
|
|
|
void init_vector();
|
|
void init_param();
|
|
void init_range();
|
|
|
|
// TODO : lyapunov exponent uit rekenen
|
|
bool is_chaos();
|
|
|
|
|
|
// TODO : optimaliseren voor lage graads veeltermen
|
|
void iterate();
|
|
void polynome();
|
|
void recur(unsigned int curr_dimension, unsigned int prev_i, unsigned int n, unsigned int& m, double prev_product = 1.0);
|
|
void poly_A();
|
|
void poly_2();
|
|
void logistic();
|
|
|
|
void plot();
|
|
void output();
|
|
};
|
|
|
|
#endif // ATTRACTOR_HPP
|
|
|
|
|