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.
34 lines
662 B
34 lines
662 B
15 years ago
|
/*
|
||
|
* KernelBasicVector.cpp
|
||
|
* AwesomeAttractor
|
||
|
*
|
||
|
* Created by Joshua Moerman on 18-07-10.
|
||
|
* Copyright 2010 Rodo. All rights reserved.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
#include "KernelBasicVector.hpp"
|
||
|
|
||
|
KernelBasicVector::KernelBasicVector(const unsigned int dimension):
|
||
|
myDimension(dimension){
|
||
|
vectorNew = new double[dimension];
|
||
|
vectorOld = new double[dimension];
|
||
|
|
||
|
for ( unsigned int i = 0; i < myDimension; i++ ) {
|
||
|
vectorNew[i] = vectorOld[i] = 0.0;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
double * & KernelBasicVector::vector(){
|
||
|
return vectorNew;
|
||
|
}
|
||
|
|
||
|
double * & KernelBasicVector::previousVector(){
|
||
|
return vectorOld;
|
||
|
}
|
||
|
|
||
|
unsigned int KernelBasicVector::dimension() const{
|
||
|
return myDimension;
|
||
|
}
|
||
|
|