A Binary Symetric Channel with crossover probability p.
More...
#include <itpp/comm/channel.h>
|
| | BSC (double in_p=0.0) |
| | Class constructor. Sets the error probability to p.
|
| void | set_prob (double in_p) |
| | Set crossover (bit error) probability.
|
| double | get_prob () const |
| | Get crossover (bit error) probability.
|
| bvec | operator() (const bvec &input) |
| | Feed input through the BSC channel.
|
A Binary Symetric Channel with crossover probability p.
Input and output are of type bvec with 0 and 1. Example:
int main() {
bvec transmitted_bits =
randb(100);
bvec received_bits = bsc(transmitted_bits);
}
BSC(double in_p=0.0)
Class constructor. Sets the error probability to p.
bin randb(void)
Generates a random bit (equally likely 0s and 1s)
Include file for the IT++ communications module.
Definition at line 1037 of file channel.h.
◆ BSC()
| itpp::BSC::BSC |
( |
double | in_p = 0.0 | ) |
|
|
inline |
Class constructor. Sets the error probability to p.
Definition at line 1041 of file channel.h.
◆ set_prob()
| void itpp::BSC::set_prob |
( |
double | in_p | ) |
|
|
inline |
Set crossover (bit error) probability.
Definition at line 1043 of file channel.h.
◆ get_prob()
| double itpp::BSC::get_prob |
( |
| ) |
const |
|
inline |
Get crossover (bit error) probability.
Definition at line 1045 of file channel.h.
◆ operator()()
| bvec itpp::BSC::operator() |
( |
const bvec & | input | ) |
|
The documentation for this class was generated from the following files: