|
|
|
#ifndef ATTRACTORKERNEL_HPP
|
|
|
|
#define ATTRACTORKERNEL_HPP
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Protocol/interface, what you want
|
|
|
|
*/
|
|
|
|
class AttractorKernel {
|
|
|
|
public:
|
|
|
|
|
|
|
|
// parameters are stored in a array of doubles
|
|
|
|
// if you want to use other types, use the properties
|
|
|
|
virtual double & operator[](const unsigned int index) = 0;
|
|
|
|
virtual double const & operator[](const unsigned int index) const = 0;
|
|
|
|
|
|
|
|
virtual unsigned int numberOfParameters() const = 0;
|
|
|
|
|
|
|
|
// iterate his formula
|
|
|
|
// vector pointers will be swapped! so new remains new and old remains old
|
|
|
|
virtual void operator()() = 0;
|
|
|
|
|
|
|
|
// getter functions for teh resulta (can be used as setters, and it may be used as such)
|
|
|
|
virtual double * & vector() = 0;
|
|
|
|
virtual double * & previousVector() = 0;
|
|
|
|
|
|
|
|
virtual unsigned int dimension() const = 0;
|
|
|
|
|
|
|
|
// dtor, default is generally good
|
|
|
|
virtual ~AttractorKernel() {};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ATTRACTORKERNEL_HPP
|
|
|
|
|