IT++ Logo
Public Member Functions | List of all members
itpp::BSC Class Reference

A Binary Symetric Channel with crossover probability p. More...

#include <itpp/comm/channel.h>

Public Member Functions

 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.
 

Detailed Description

A Binary Symetric Channel with crossover probability p.

Input and output are of type bvec with 0 and 1. Example:

#include <itpp/itcomm.h>
using namespace itpp;
int main() {
// Initiate the BSC with cross-over probability 0.1
BSC bsc(0.1);
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.
Definition: channel.h:1041
bin randb(void)
Generates a random bit (equally likely 0s and 1s)
Definition: random.h:793
Include file for the IT++ communications module.
itpp namespace
Definition: itmex.h:37

Definition at line 1037 of file channel.h.


The documentation for this class was generated from the following files:
SourceForge Logo

Generated on Thu Sep 23 2021 09:01:13 for IT++ by Doxygen 1.9.1