-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sparse: fix alist format by including padding
In #2 it was pointed that the alist format used by ldpc-toolbox is incorrect because it does not include zeros for padding of irregular codes, as required by MacKay's original definition. This fixes the problem in the following way: - The SparseMatrix::from_alist function supports reading both the format with zero padding and the format without zero padding. - The SparseMatrix::write_alist and SparseMatrix::alist functions now include zero padding. There are variants of these functions called write_alist_no_padding and alist_no_padding which omit the zero padding. Additionally, the whitespace at the end of each line generated by write_alist has been removed.
- Loading branch information
1 parent
a8fae7e
commit 3acfba1
Showing
2 changed files
with
180 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters