MDA
|
A class to store the Pfam domain matches in a compact way. More...
#include <CRS_Mat.hpp>
Public Member Functions | |
CRS_Mat () | |
Standard Constructor. | |
CRS_Mat (const std::string &mat_f) | |
Constructor which immediately reads the file. More... | |
~CRS_Mat () | |
Destructor. | |
std::string | name () |
Returns the identifier of the Matrix. More... | |
void | read (const std::string &mat_f) |
Reads a CRS matrix from a binary file. More... | |
DataType | value (int i, int j) const |
Returns the values stored in the matrix. More... | |
A class to store the Pfam domain matches in a compact way.
The domain matrix is symmetric so that only half of the entries are actually stored. The matrix can be read from a binary file of the following format:
ID var name length type variable_name 0 name 10 char name 1 n_domains 1 int n_domains 2 n_values 1 int n_values 3 ids n_domains int The domain identifier as int (eg PF00005 = 5) 4 row_ids n_domains int The row ids 5 col_ids n_values int The column ids 6 values n_values DataType The actual values stored in the matrix
MDAT::CRS_Mat< DataType >::CRS_Mat | ( | const std::string & | mat_f | ) |
Constructor which immediately reads the file.
mat_f |
|
inline |
Returns the identifier of the Matrix.
void MDAT::CRS_Mat< DataType >::read | ( | const std::string & | mat_f | ) |
Reads a CRS matrix from a binary file.
mat_f | The file to read. |
DataType MDAT::CRS_Mat< DataType >::value | ( | int | i, |
int | j | ||
) | const |
Returns the values stored in the matrix.
i | The row id |
j | The column id |