Computational Physics - Department of Physics

(Axel Boer) #1

200 6 Linear Algebra


/**
*@brief Checks the validity of the indexing.
*@param i, an integer for indexing the rows.
*@param j, an integer for indexing the columns.
**/
boolindexOk(inti,intj=0)const;
/**
*@brief Change the dimensions of an array.
*@param ni number of entries in the first dimension.
*@param nj number of entries in the second dimension.
*@param nk number of entries in the third dimension.
*@param nl number of entries in the fourth dimension.
*@param nm number of entries in the fifth dimension.
*@param nn number of entries in the sixth dimension.
**/
boolredim(intni,intnj=0,intnk=0,intnl=0,intnm=0,intnn=0);
/**
*@return The total number of entries in the array, i.e., the sum of the entries in all
the dimensions.
**/
intgetLength()const{returnlength;}

/**
*@return The number of rows in a matrix.
**/
intgetRows()const {returnsize[0];}
/**
*@return Returns the number of columns in a matrix.
**/
intgetColumns()const {returnsize[1];}

/**@brief Gives the number of entries in a dimension.
*
*@param i An integer from 0 to 5 indicating the dimension we want to explore.
*@return size[i] An integer for the number of elements in the dimension number i.
**/
intdimension(inti)const{returnsize[i];}

/**
*The number of dimensions in the array.
**/
intgetNDIM()const{returnndim;}

/**
*@return A constant pointer to the array of data.
*This function can be used to interface C++ with Python/Fortran/C.
**/
constT*getPtr()const;

/**
*@return A pointer to the array of data.
*This function can be used to interface C++ with Python/Fortran/C.
Free download pdf