My old project for strange attractors
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 

43 lines
986 B

/*
* KernelBasicParameter.cpp
* AwesomeAttractor
*
* Created by Joshua Moerman on 18-07-10.
* Copyright 2010 Rodo. All rights reserved.
*
*/
#include "KernelBasicParameter.hpp"
KernelBasicParameter::KernelBasicParameter(const unsigned int numberOfParameters):
myNumberOfParameters(numberOfParameters){
init();
}
void KernelBasicParameter::init(){
parameters = new double[myNumberOfParameters];
for ( unsigned int i = 0; i < myNumberOfParameters; i++ ) {
parameters[i] = 0.0;
}
}
void KernelBasicParameter::resetNumberOfParameters(const unsigned int numberOfParameters){
delete parameters;
myNumberOfParameters = numberOfParameters;
init();
}
double & KernelBasicParameter::operator[](const unsigned int index){
return parameters[index];
}
double const & KernelBasicParameter::operator[](const unsigned int index) const{
return parameters[index];
}
unsigned int KernelBasicParameter::numberOfParameters() const{
return myNumberOfParameters;
}