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.
49 lines
1.1 KiB
49 lines
1.1 KiB
#ifndef ATTRACTORKERNEL_HPP
|
|
#define ATTRACTORKERNEL_HPP
|
|
|
|
|
|
/*
|
|
ABC
|
|
*/
|
|
class AttractorKernel {
|
|
private:
|
|
|
|
void allocate();
|
|
void dealloc();
|
|
|
|
protected:
|
|
|
|
// stuff used by subclasses
|
|
AttractorKernel(const unsigned int dimension, const unsigned int numberOfParameters);
|
|
void reallocParameters(const unsigned int numberOfParameters);
|
|
|
|
unsigned int numberOfParameters;
|
|
double * parameters;
|
|
|
|
unsigned int dimension;
|
|
double * vectorNew;
|
|
double * vectorOld;
|
|
|
|
|
|
public:
|
|
|
|
// parameters are stored in a array of doubles
|
|
double & operator[](const unsigned int index);
|
|
double const & operator[](const unsigned int index) const;
|
|
unsigned int getNumberOfParameters() const;
|
|
|
|
// iterate his formula, implemented by subclasses
|
|
virtual void operator()() = 0;
|
|
|
|
// getter functions for teh resulta (can't be used as setters)
|
|
double const * vector() const;
|
|
double const * previousVector() const;
|
|
unsigned int getDimension() const;
|
|
|
|
// dtor, should be virtual for subclasses to be deleted
|
|
virtual ~AttractorKernel();
|
|
|
|
};
|
|
|
|
#endif // ATTRACTORKERNEL_HPP
|
|
|
|
|