| NTPoly
    | 
A datatype for storing a CSR matrix (real values). More...
#include <SMatrix.h>
| Public Member Functions | |
| Matrix_lsr (int columns, int rows) | |
| Matrix_lsr (std::string file_name) | |
| Matrix_lsr (const NTPoly::TripletList_r &list, int rows, int columns) | |
| Matrix_lsr (const NTPoly::Matrix_lsr &matB) | |
| int | GetRows () const | 
| Get the number of rows in a matrix. | |
| int | GetColumns () const | 
| Get the number of columns in a matrix. | |
| void | ExtractRow (int row_number, Matrix_lsr &row_out) const | 
| void | ExtractColumn (int column_number, Matrix_lsr &column_out) const | 
| void | Scale (double constant) | 
| void | Increment (const NTPoly::Matrix_lsr &matB, double alpha, double threshold) | 
| double | Dot (const NTPoly::Matrix_lsr &matB) const | 
| void | PairwiseMultiply (const NTPoly::Matrix_lsr &matA, const NTPoly::Matrix_lsr &matB) | 
| void | Gemm (const NTPoly::Matrix_lsr &matA, const NTPoly::Matrix_lsr &matB, bool isATransposed, bool isBTransposed, double alpha, double beta, double threshold, NTPoly::MatrixMemoryPool_r &memory_pool) | 
| void | Transpose (const NTPoly::Matrix_lsr &matA) | 
| Transpose a sparse matrix. | |
| void | Print () const | 
| Print the sparse matrix to the console. | |
| void | WriteToMatrixMarket (std::string file_name) const | 
| void | MatrixToTripletList (NTPoly::TripletList_r &triplet_list) const | 
| ~Matrix_lsr () | |
| Standard destructor. | |
A datatype for storing a CSR matrix (real values).
| NTPoly::Matrix_lsr::Matrix_lsr | ( | int | columns, | 
| int | rows | ||
| ) | 
Basic constructor.
| columns | number of columns for the matrix. | 
| rows | number of rows for the matrix. | 
| NTPoly::Matrix_lsr::Matrix_lsr | ( | std::string | file_name | ) | 
Construct from a matrix market file.
| file_name | matrix market file name. | 
| NTPoly::Matrix_lsr::Matrix_lsr | ( | const NTPoly::TripletList_r & | list, | 
| int | rows, | ||
| int | columns | ||
| ) | 
Construct from a triplet list.
| list | a list of triplet values to set in the matrix. | 
| columns | number of columns for the matrix. | 
| rows | number of rows for the matrix. | 
| NTPoly::Matrix_lsr::Matrix_lsr | ( | const NTPoly::Matrix_lsr & | matB | ) | 
Copy constructor.
| matB | the matrix to copy from. | 
| double NTPoly::Matrix_lsr::Dot | ( | const NTPoly::Matrix_lsr & | matB | ) | const | 
Matrix dot product.
| matB | matrix to dot with. | 
| void NTPoly::Matrix_lsr::ExtractColumn | ( | int | column_number, | 
| Matrix_lsr & | column_out | ||
| ) | const | 
Extract a column from the matrix into the compressed vector representation
| column_number | the column to extract | 
| column_out | the matrix representing that column | 
| void NTPoly::Matrix_lsr::ExtractRow | ( | int | row_number, | 
| Matrix_lsr & | row_out | ||
| ) | const | 
Extract a row from the matrix into the compressed vector representation.
| row_number | the row to extract | 
| row_out | the matrix representing that row | 
| void NTPoly::Matrix_lsr::Gemm | ( | const NTPoly::Matrix_lsr & | matA, | 
| const NTPoly::Matrix_lsr & | matB, | ||
| bool | isATransposed, | ||
| bool | isBTransposed, | ||
| double | alpha, | ||
| double | beta, | ||
| double | threshold, | ||
| NTPoly::MatrixMemoryPool_r & | memory_pool | ||
| ) | 
This := alpha*matA*op( matB ) + beta*this
| matA | |
| matB | |
| isATransposed | true if A is already transposed. | 
| isBTransposed | true if B is already transposed. | 
| alpha | scaling value. | 
| beta | scaling value. | 
| threshold | for flushing small values. | 
| memory_pool | a memory pool to use for storing intermediates. | 
| void NTPoly::Matrix_lsr::Increment | ( | const NTPoly::Matrix_lsr & | matB, | 
| double | alpha, | ||
| double | threshold | ||
| ) | 
This = alpha*MatrixB + This(AXPY).
| matB | matrix to add. | 
| alpha | scale for the matrix. | 
| threshold | for flushing small values. | 
| void NTPoly::Matrix_lsr::MatrixToTripletList | ( | NTPoly::TripletList_r & | triplet_list | ) | const | 
Compute a triplet list from the entries in a matrix.
| triplet_list | output. | 
| void NTPoly::Matrix_lsr::PairwiseMultiply | ( | const NTPoly::Matrix_lsr & | matA, | 
| const NTPoly::Matrix_lsr & | matB | ||
| ) | 
Pairwise multiply two sparse matrices.
| matA | |
| matB | 
| void NTPoly::Matrix_lsr::Scale | ( | double | constant | ) | 
Scale the matrix by a constant.
| constant | value to scale by. | 
| void NTPoly::Matrix_lsr::WriteToMatrixMarket | ( | std::string | file_name | ) | const | 
Write the sparse matrix to file.
| file_name | file to print to. |