Shannon.Channel (Shannon v0.0.2)

Copy Markdown

Module for code related with different kinds of channels for sending data.

Summary

Functions

A binary symetric channel, where a 0 will flip to a 1 with a probability of p, and a 1 will flip to a 0 with a probability of p.

Functions

binary_symetric_channel(values, p)

@spec binary_symetric_channel(list(), float()) ::
  list() | {:error, :p_must_be_between_0_and_1}

A binary symetric channel, where a 0 will flip to a 1 with a probability of p, and a 1 will flip to a 0 with a probability of p.

P is a probability value of between 0 and 1.