Parameterized "alist" representation of sparse GF(2) matrix. More...
#include <itpp/base/gf2mat.h>
Public Member Functions | |
GF2mat_sparse_alist () | |
Default constructor. | |
GF2mat_sparse_alist (const std::string &fname) | |
Constructor, which reads alist data from a file named fname . | |
void | read (const std::string &fname) |
Read alist data from a file named fname . | |
void | write (const std::string &fname) const |
Write alist data to a file named fname . | |
GF2mat_sparse | to_sparse (bool transpose=false) const |
Convert "alist" representation to GF2mat_sparse . | |
void | from_sparse (const GF2mat_sparse &mat, bool transpose=false) |
Import "alist" representation from GF2mat_sparse . | |
Protected Attributes | |
bool | data_ok |
Flag indicating that "alist" matrix data are properly set. | |
int | M |
Size of the matrix: M rows x N columns. | |
int | N |
Size of the matrix: M rows x N columns. | |
imat | mlist |
List of integer coordinates in the m direction with non-zero entries. | |
imat | nlist |
List of integer coordinates in the n direction with non-zero entries. | |
ivec | num_mlist |
Weight of each row m. | |
ivec | num_nlist |
Weight of each column n. | |
int | max_num_m |
Maximum weight of rows. | |
int | max_num_n |
Maximum weight of columns. | |
Parameterized "alist" representation of sparse GF(2) matrix.
This class is used to provide a parameterized representation of a GF2mat_sparse
class. The format is compatible with the "alist" format defined by David MacKay, Matthew Davey and John Lafferty:
For examples of "alist" representation visit David MacKay's Encyclopedia of Sparse Graph Codes:
GF2mat_sparse itpp::GF2mat_sparse_alist::to_sparse | ( | bool | transpose = false | ) | const |
Convert "alist" representation to GF2mat_sparse
.
transpose | Indicates whether a matrix should be transposed during the conversion process |
Definition at line 193 of file gf2mat.cpp.
References itpp::Sparse_Mat< T >::compact(), M, max_num_m, mlist, N, num_mlist, itpp::Sparse_Mat< T >::set_new(), and itpp::Sparse_Mat< T >::transpose().
Referenced by itpp::LDPC_Parity::import_alist().
void itpp::GF2mat_sparse_alist::from_sparse | ( | const GF2mat_sparse & | mat, |
bool | transpose = false |
||
) |
Import "alist" representation from GF2mat_sparse
.
mat | Matrix to import |
transpose | Indicates whether a matrix should be transposed during the conversion process |
Definition at line 217 of file gf2mat.cpp.
References itpp::Sparse_Mat< T >::cols(), itpp::concat(), data_ok, itpp::Sparse_Mat< T >::get_col(), M, itpp::max(), max_num_m, max_num_n, mlist, N, nlist, num_mlist, num_nlist, itpp::Sparse_Mat< T >::rows(), and itpp::Sparse_Mat< T >::transpose().
Referenced by itpp::LDPC_Parity::export_alist().
Generated on Sat Jul 6 2013 10:54:30 for IT++ by Doxygen 1.8.2