IT++ Logo
commfunc.h
Go to the documentation of this file.
1 
29 #ifndef COMMFUNC_H
30 #define COMMFUNC_H
31 
32 #include <itpp/base/mat.h>
33 #include <itpp/base/vec.h>
34 #include <itpp/itexports.h>
35 
36 namespace itpp
37 {
38 
47 ITPP_EXPORT bmat graycode(int m);
48 
53 ITPP_EXPORT int hamming_distance(const bvec &a, const bvec &b);
54 
59 ITPP_EXPORT int weight(const bvec &a);
60 
81 ITPP_EXPORT vec waterfilling(const vec& alpha, double P);
82 
83 } // namespace itpp
84 
85 #endif // #ifndef COMMFUNC_H
itpp::hamming_distance
int hamming_distance(const bvec &a, const bvec &b)
Calculate the Hamming distance between a and b.
Definition: commfunc.cpp:59
bmat
Mat< bin > bmat
bin matrix
Definition: mat.h:508
itpp::graycode
bmat graycode(int m)
Generate Gray code of blocklength m.
Definition: commfunc.cpp:39
itpp
itpp namespace
Definition: itmex.h:36
mat.h
Matrix Class Definitions.
itpp::waterfilling
vec waterfilling(const vec &alpha, double P)
Compute the water-filling solution.
Definition: commfunc.cpp:82
vec.h
Templated Vector Class Definitions.
itpp::weight
int weight(const bvec &a)
Calculate the Hamming weight of a.
Definition: commfunc.cpp:71

Generated on Mon Apr 25 2022 14:03:04 for IT++ by Doxygen 1.8.17