Hamming distortion (source code)

= Hamming distortion

Hamming distortion is $d(x,y)=\mathbf1_{\{x\ne y\}}$, so its expected distortion is the symbol-error probability.