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:
|
inline |
| itpp::GF2mat_sparse_alist::GF2mat_sparse_alist | ( | const std::string & | fname | ) |
Constructor, which reads alist data from a file named fname.
Definition at line 40 of file gf2mat.cpp.
References read().
| void itpp::GF2mat_sparse_alist::read | ( | const std::string & | fname | ) |
| void itpp::GF2mat_sparse_alist::write | ( | const std::string & | fname | ) | const |
| 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(), itpp::Sparse_Mat< T >::transpose(), and itpp::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, from_sparse(), 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(), itpp::Sparse_Mat< T >::transpose(), and itpp::transpose().
Referenced by itpp::LDPC_Parity::export_alist(), and from_sparse().
|
protected |
Flag indicating that "alist" matrix data are properly set.
Definition at line 130 of file gf2mat.h.
Referenced by from_sparse(), read(), and write().
|
protected |
Size of the matrix: M rows x N columns.
Definition at line 132 of file gf2mat.h.
Referenced by from_sparse(), read(), to_sparse(), and write().
|
protected |
Size of the matrix: M rows x N columns.
Definition at line 134 of file gf2mat.h.
Referenced by from_sparse(), read(), to_sparse(), and write().
|
protected |
List of integer coordinates in the m direction with non-zero entries.
Definition at line 136 of file gf2mat.h.
Referenced by from_sparse(), read(), to_sparse(), and write().
|
protected |
List of integer coordinates in the n direction with non-zero entries.
Definition at line 138 of file gf2mat.h.
Referenced by from_sparse(), read(), and write().
|
protected |
Weight of each row m.
Definition at line 140 of file gf2mat.h.
Referenced by from_sparse(), read(), to_sparse(), and write().
|
protected |
Weight of each column n.
Definition at line 142 of file gf2mat.h.
Referenced by from_sparse(), read(), and write().
|
protected |
Maximum weight of rows.
Definition at line 144 of file gf2mat.h.
Referenced by from_sparse(), read(), to_sparse(), and write().
|
protected |
Maximum weight of columns.
Definition at line 146 of file gf2mat.h.
Referenced by from_sparse(), read(), and write().
Generated on Tue Dec 10 2024 04:49:37 for IT++ by Doxygen 1.12.0