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
vec waterfilling(const vec &alpha, double P)
Compute the water-filling solution.
Definition: commfunc.cpp:82
int weight(const bvec &a)
Calculate the Hamming weight of a.
Definition: commfunc.cpp:71
bmat graycode(int m)
Generate Gray code of blocklength m.
Definition: commfunc.cpp:39
int hamming_distance(const bvec &a, const bvec &b)
Calculate the Hamming distance between a and b.
Definition: commfunc.cpp:59
Matrix Class Definitions.
Mat< bin > bmat
bin matrix
Definition: mat.h:508
itpp namespace
Definition: itmex.h:37
Templated Vector Class Definitions.
SourceForge Logo

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