// // $filename // $projectname // // Created by Joshua moerman on $TODAY. // Copyright 2010 Joshua Moerman. All rights reserved. // const static unsigned int dimension = 3; const static unsigned int numberOfParameters = 3; PolynomialA3D::PolynomialA3D(){ init(); } void PolynomialA3D::init(){ myParameters = new double[numberOfParameters]; vectorNew = new double[dimension]; vectorOld = new double[dimension]; assert(myParameters != NULL); assert(vectorNew != NULL); assert(vectorOld != NULL); for ( unsigned int i = 0; i < numberOfParameters; i++ ) { myParameters[i] = 0.0; } for ( unsigned int i = 0; i < dimension; i++ ) { vectorNew[i] = vectorOld[i] = 0.0; } } // setters, getters, all i/o to other classes/objects void * PolynomialA3D::getProperty(const string identifier) { if ( identifier == "dimension" ) { unsigned int * _return = new unsigned int; *_return = dimension; return _return; } return NULL; } void PolynomialA3D::setProperty(const string identifier, const void * _value) { } double * & PolynomialA3D::parameters() { return myParameters; } double & PolynomialA3D::parameter(const unsigned int index) { return myParameters[index]; } double * & PolynomialA3D::vector() { return vectorNew; } double * & PolynomialA3D::previousVector() { return vectorOld; }