/* * 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; }