34 #include <itpp/itexports.h> 59 ITPP_EXPORT
int weight(
const bvec &a);
81 ITPP_EXPORT vec
waterfilling(
const vec& alpha,
double P);
85 #endif // #ifndef COMMFUNC_H int weight(const bvec &a)
Calculate the Hamming weight of a.
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...
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.
int hamming_distance(const bvec &a, const bvec &b)
Calculate the Hamming distance between a and b.
Mat< bin > bmat
bin matrix
Templated Vector Class Definitions.