Code covered by the BSD License  

Highlights from
This is an implementation of (7,4) hamming code using belief propagation

image thumbnail

This is an implementation of (7,4) hamming code using belief propagation

by

 

An implementation of (7,4) hamming code using belief propagation

sumMsg(x, edgeIDArray, messageV2F, jV)
function val = sumMsg(x, edgeIDArray, messageV2F, jV)
    edgeIDArray(jV) = [];
    nV = length(edgeIDArray);
    len = 2^nV;
    val = 0;
    for i = 1: len
        binArray = rot90(dec2binvec(i-1,nV),2);
        prodVal = fun2(x, binArray);
        if(prodVal ~= 0)
            for j = 1 : nV
                edgeID = edgeIDArray(j);
                prodVal = prodVal * messageV2F(edgeID,binArray(j)+1);
            end;
        end;      
        val = val + prodVal;
    end;
end

Contact us