|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Class to read CSR file. More...
#include <csr_reader.h>
Public Member Functions | |
| csrFileReader (const std::string &filename) | |
| void | parseFile () |
| int | getNumberOfR () const |
| SparseMatrix< T > | getMatrix (int Rx, int Ry, int Rz) |
| SparseMatrix< T > | getMatrix (int index) const |
| std::vector< int > | getRCoordinate (int index) const |
| int | getStep () const |
| int | getMatrixDimension () const |
Public Member Functions inherited from ModuleIO::FileReader | |
| FileReader (std::string filename) | |
| ~FileReader () | |
| bool | isOpen () const |
| void | readLine () |
Private Attributes | |
| std::vector< std::vector< int > > | RCoordinates |
| std::vector< SparseMatrix< T > > | sparse_matrices |
| int | step |
| int | matrixDimension |
| int | numberOfR |
Additional Inherited Members | |
Public Attributes inherited from ModuleIO::FileReader | |
| std::stringstream | ss |
Class to read CSR file.
This class is used to read CSR file the default format is like:
It will store the R coordinates and sparse matrices as two vectors. One can use getter functions to get the R coordinates and sparse matrices, and related info including step, matrix dimension, number of R.
| ModuleIO::csrFileReader< T >::csrFileReader | ( | const std::string & | filename | ) |
| SparseMatrix< T > ModuleIO::csrFileReader< T >::getMatrix | ( | int | index | ) | const |
| SparseMatrix< T > ModuleIO::csrFileReader< T >::getMatrix | ( | int | Rx, |
| int | Ry, | ||
| int | Rz | ||
| ) |
| int ModuleIO::csrFileReader< T >::getMatrixDimension | ( | ) | const |
| int ModuleIO::csrFileReader< T >::getNumberOfR | ( | ) | const |
| std::vector< int > ModuleIO::csrFileReader< T >::getRCoordinate | ( | int | index | ) | const |
| int ModuleIO::csrFileReader< T >::getStep | ( | ) | const |
| void ModuleIO::csrFileReader< T >::parseFile | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |