Computational Physics - Department of Physics

(Axel Boer) #1

204 6 Linear Algebra


#endif
returndata[i + j*dx1];
}


template
inlineT& Array::operator()(inti,intj,intk){
#ifCHECKBOUNDS_ON
indexOk(i,j,k);
#endif
returndata[i + jdx1 + kdx2];
}


template
inlineT& Array::operator()(inti,intj,intk,intl){
#ifCHECKBOUNDS_ON
indexOk(i,j,k,l);
#endif
returndata[i + jdx1 + kdx2 + l*dx3];
}


template
inlineT& Array::operator()(inti,intj,intk,intl,intm){
#ifCHECKBOUNDS_ON
indexOk(i,j,k,l,m);
#endif
returndata[i + jdx1 + kdx2 + ldx3 + mdx4];
}


template
inlineT& Array::operator()(inti,intj,intk,intl,intm,intn){
#ifCHECKBOUNDS_ON
indexOk(i,j,k,l,m,n);
#endif
returndata[i + jdx1 + kdx2 + ldx3 + mdx4 + n*dx5];
}


template
inline constT*Array::getPtr() const {returndata;}


template
inlineT*Array::getPtr(){returndata;}


template
inline int*Array::getPtrSize(){returnsize;}


// template

Free download pdf