error_counters.h
Go to the documentation of this file.
#ifndef ERROR_COUNTERS_H
#define ERROR_COUNTERS_H
#include <itpp/base/vec.h>
#include <itpp/itexports.h>
namespace itpp
{
class ITPP_EXPORT BERC
{
public:
BERC(int indelay = 0, int inignorefirst = 0, int inignorelast = 0);
void count(const bvec &in1, const bvec &in2);
void count(const bool x);
void estimate_delay(const bvec &in1, const bvec &in2, int mindelay = -100,
int maxdelay = 100);
void clear() { errors = 0; corrects = 0; }
void report() const;
int get_delay() const { return delay; }
double get_errors() const { return errors; }
double get_corrects() const { return corrects; }
double get_total_bits() const { return (errors + corrects); }
double get_errorrate() const { return (errors / (corrects + errors)); }
static double count_errors(const bvec &in1, const bvec &in2,
int indelay = 0, int inignorefirst = 0,
int inignorelast = 0);
private:
int delay;
int ignorefirst;
int ignorelast;
double errors;
double corrects;
};
class ITPP_EXPORT BLERC
{
public:
BLERC(void);
BLERC(int blocksize);
void set_blocksize(int inblocksize, bool clear = true);
void count(const bvec &in1, const bvec &in2);
void count(const bool x);
void clear() { errors = 0; corrects = 0; }
double get_errors() const { return errors; }
double get_corrects() const { return corrects; }
double get_total_blocks() const { return (errors + corrects); }
double get_errorrate() const { return (errors / (corrects + errors)); }
//protected:
private:
bool setup_done;
int blocksize;
double errors;
double corrects;
bool CORR;
};
} // namespace itpp
#endif // #ifndef ERROR_COUNTERS_H
itpp::BLERC::get_total_blocks
double get_total_blocks() const
Returns the total number of block processed.
Definition: error_counters.h:152
itpp::BERC::get_errorrate
double get_errorrate() const
Returns the estimated bit error rate.
Definition: error_counters.h:103
itpp::BLERC::get_errorrate
double get_errorrate() const
Returns the block error rate.
Definition: error_counters.h:154
itpp::BERC::get_corrects
double get_corrects() const
Returns the counted number of corectly received bits.
Definition: error_counters.h:99
itpp
itpp namespace
Definition: itmex.h:36
itpp::BLERC::get_corrects
double get_corrects() const
Returns the number of correct blocks.
Definition: error_counters.h:150
itpp::BERC::clear
void clear()
Clears the bit error counter.
Definition: error_counters.h:91
itpp::BLERC::get_errors
double get_errors() const
Returns the number of block errors.
Definition: error_counters.h:148
itpp::BERC::get_total_bits
double get_total_bits() const
Returns the total number of bits processed.
Definition: error_counters.h:101
itpp::BLERC
Class for counting block error rates.
Definition: error_counters.h:131
itpp::BERC::get_errors
double get_errors() const
Returns the counted number of bit errors.
Definition: error_counters.h:97
itpp::BERC
Bit Error Rate Counter (BERC) Class.
Definition: error_counters.h:67
vec.h
Templated Vector Class Definitions.
itpp::BLERC::clear
void clear()
Clear the block error counter.
Definition: error_counters.h:146
itpp::BERC::get_delay
int get_delay() const
Return the delay, assumed or estimated, between in1 and in2.
Definition: error_counters.h:95

Generated on Mon Mar 23 2020 06:18:03 for IT++ by Doxygen 1.8.17