I am writing a code for an LDPC belief propogation decoder in matlab. I am following the algorithm specified in: http://www.ece.umd.edu/~tta/resources/LDPC.pdf page 6.
I want to use sparse matrix toward this goal. During which i want to iterate over large sized matrix which has only few ones. My question is how can i iterate over only the ones in the matrix?
I'll be more specific: let's say i have the following matlab code:
for row_index = 1 : row_num
for coloum_index = 1 : col_num
if parity_check_matrix(row_index, coloum_index)
messages_llr_matrix(row_index, coloum_index) = ...
code_word_aprior_prob(coloum_index);
end
end
This code takes a vector 'code_word_aprior_prob' and assigns it's values to the row in the matrix 'messages_llr_matrix' which are not zeros. Now, i want to perform this using sparse matrix.
parity_check_matrix is a sparse matrix.
std::vectorcontainer for example. - rayryeng