IT++ Logo Newcom Logo

itpp::BSC Class Reference
[Communication Channel Models]

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

#include <itpp/comm/channel.h>

List of all members.

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"

    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);
    }

Definition at line 807 of file channel.h.


Constructor & Destructor Documentation

itpp::BSC::BSC double  in_p = 0.0  )  [inline]
 

Class constructor. Sets the error probability to p.

Definition at line 810 of file channel.h.


Member Function Documentation

void itpp::BSC::set_prob double  in_p  )  [inline]
 

Set crossover (bit error) probability.

Definition at line 812 of file channel.h.

double itpp::BSC::get_prob  )  const [inline]
 

Get crossover (bit error) probability.

Definition at line 814 of file channel.h.

bvec itpp::BSC::operator() const bvec input  ) 
 

Feed input through the BSC channel.

Definition at line 1251 of file channel.cpp.

References itpp::length().


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

Generated on Thu Apr 19 14:20:42 2007 for IT++ by Doxygen 1.4.6