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
int weight(const bvec &a)
Calculate the Hamming weight of a.
Definition: commfunc.cpp:71
Matrix Class Definitions.
vec waterfilling(const vec &alpha, double P)
Compute the water-filling solutionThis function computes the solution of the water-filling problem s...
Definition: commfunc.cpp:82
itpp namespace
Definition: itmex.h:36
bmat graycode(int m)
Generate Gray code of blocklength m.The codes are contained as binary codewords {0,1} in the rows of the returned matrix. See also the gray() function in math/scalfunc.h.
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
Mat< bin > bmat
bin matrix
Definition: mat.h:508
Templated Vector Class Definitions.
SourceForge Logo

Generated on Sun Apr 10 2022 12:00:00 for IT++ by Doxygen 1.8.14