Joshua
15 years ago
8 changed files with 86 additions and 31 deletions
@ -0,0 +1,19 @@ |
|||||
|
|
||||
|
#include "BasicKernel.h" |
||||
|
|
||||
|
double * & BasicKernel::parameters() { |
||||
|
return myParameters; |
||||
|
} |
||||
|
|
||||
|
double & BasicKernel::parameter(const unsigned int index) { |
||||
|
return myParameters[index]; |
||||
|
} |
||||
|
|
||||
|
double * & BasicKernel::vector() { |
||||
|
return vectorNew; |
||||
|
} |
||||
|
|
||||
|
double * & BasicKernel::previousVector() { |
||||
|
return vectorOld; |
||||
|
} |
||||
|
|
@ -0,0 +1,31 @@ |
|||||
|
#ifndef BASICKERNEL_HPP |
||||
|
#define BASICKERNEL_HPP |
||||
|
|
||||
|
#include <cassert> |
||||
|
#include <iostream> |
||||
|
|
||||
|
#include "../AttractorKernel.hpp" |
||||
|
|
||||
|
class BasicKernel : public AttractorKernel { |
||||
|
protected: |
||||
|
|
||||
|
double * myParameters; |
||||
|
|
||||
|
double * vectorNew; |
||||
|
double * vectorOld; |
||||
|
|
||||
|
public: |
||||
|
|
||||
|
// parameters are stored in a array of doubles
|
||||
|
// if you want to use other types, use the properties
|
||||
|
virtual double& parameter(const unsigned int index); |
||||
|
virtual double*& parameters(); |
||||
|
|
||||
|
// getter functions for teh resulta
|
||||
|
virtual double * & vector(); |
||||
|
virtual double * & previousVector(); |
||||
|
|
||||
|
}; |
||||
|
|
||||
|
#endif // POLYNOMIAL_HPP
|
||||
|
|
Reference in new issue