1
Fork 0
This repository has been archived on 2025-04-09. You can view files and clone it, but cannot push or open issues or pull requests.
awesome-attractor/kernels/KernelBasicParameter.hpp
2010-07-19 22:02:17 +02:00

46 lines
No EOL
1 KiB
C++

/*
* KernelBasicParameter.hpp
* AwesomeAttractor
*
* Created by Joshua Moerman on 18-07-10.
* Copyright 2010 Rodo. All rights reserved.
*
*/
#ifndef KERNELBASICPARAMETER_HPP
#define KERNELBASICPARAMETER_HPP
#include "../AttractorKernel.hpp"
/*
This is a partial default implementation of the abstract AttractorKernel class
you can easily use the constructor to initialise the parameters and stuff...
*/
class KernelBasicParameter : virtual public AttractorKernel {
private:
void init();
void dealloc();
protected:
unsigned int myNumberOfParameters;
double * parameters;
KernelBasicParameter(const unsigned int numberOfParameters);
virtual ~KernelBasicParameter();
void resetNumberOfParameters(const unsigned int numberOfParameters);
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);
virtual double const & operator[](const unsigned int index) const;
virtual unsigned int numberOfParameters() const;
};
#endif