00001 // 00002 // SPUC - Signal processing using C++ - A DSP library 00003 /*---------------------------------------------------------------------------* 00004 * IT++ * 00005 *---------------------------------------------------------------------------* 00006 * Copyright (c) 1995-2001 by Tony Ottosson, Thomas Eriksson, Pål Frenger, * 00007 * Tobias Ringström, and Jonas Samuelsson. * 00008 * * 00009 * Permission to use, copy, modify, and distribute this software and its * 00010 * documentation under the terms of the GNU General Public License is hereby * 00011 * granted. No representations are made about the suitability of this * 00012 * software for any purpose. It is provided "as is" without expressed or * 00013 * implied warranty. See the GNU General Public License for more details. * 00014 *---------------------------------------------------------------------------*/ 00015 00026 #ifndef _commfunc_h 00027 #define _commfunc_h 00028 00029 #include <vector.h> 00030 #include <matrix.h> 00031 namespace SPUC { 00039 bmat graycode(int m); 00040 00045 int hamming_distance(const bvec &a, const bvec &b); 00046 00051 int weight(const bvec &a); 00052 } 00053 #endif // _commfunc_h