itpp::GF2mat_sparse_alist Class Reference

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`. More...
void | from_sparse (const GF2mat_sparse &mat, bool transpose=false)
| Import "alist" representation from `GF2mat_sparse`. More...

## 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.

## Detailed Description

Parameterized "alist" representation of sparse GF(2) matrix.

Author
  Adam Piatyszek and Erik G. Larsson

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:

- http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html

For examples of "alist" representation visit David MacKay's Encyclopedia of Sparse Graph Codes:

- http://www.inference.phy.cam.ac.uk/mackay/codes/data.html

Definition at line 98 of file gf2mat.h.

## Member Function Documentation

## to_sparse()

GF2mat_sparse itpp::GF2mat_sparse_alist::to_sparse | ( | bool | transpose = `false` | ) | const

Convert "alist" representation to `GF2mat_sparse`.

Parameters

  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().

## from_sparse()

void itpp::GF2mat_sparse_alist::from_sparse | ( | const GF2mat_sparse & | mat,
|  | bool | transpose = `false`
| ) |  |

Import "alist" representation from `GF2mat_sparse`.

Parameters

  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(), itpp::Sparse_Mat< T >::transpose(), and itpp::transpose().

Referenced by itpp::LDPC_Parity::export_alist().

The documentation for this class was generated from the following files:

- itpp/base/gf2mat.h
- itpp/base/gf2mat.cpp

Generated on Mon Mar 23 2020 06:18:03 for IT++ by Doxygen 1.8.17