library.h

来自「This a framework to test new ideas in tr」· C头文件 代码 · 共 50 行

H
50
字号
#ifndef CONVOLUTIONLIBRARY_H__#define CONVOLUTIONLIBRARY_H__/*** Type used to specify a status of the registers.* The Bit at position j specifies the status of register j* Because an unsigned int is used to model all registers, the number of registers (m)* cannot exceed 32.*/typedef unsigned int REG_STATUS;/*** The value used as initialization in the metric array if the metric* is not calculated, i.e. if the node in the trellis is not valid.* It is set to max int value to always be greater than any calculated* metric.*/#define METRIC_UNDEFINED 0x7fffffff	//max int/************************************* Counts the number of 1-Bits in a the numBits LSB* of the bit pattern in************************************//** * Counts the number of 1-Bits of some LSB (least significant bits) * of a bit pattern. * * @param in The bit pattern * @param numBits The number of LSB of in where the 1-Bits should be countes * @return The number of one-Bits in the numBits LSB of in */int countOnes(REG_STATUS in,int numBits);/** * Calculates the hamming distance of some LSB (least significant bits) * of two bit patterns. * * @param input1 The first bit pattern * @param input2 The second pattern * @param numBits The number of LSB of in where the hamming distance should be calculated * @return The hamming distance in the numBits LSB of input1 and input2 */int hammingDistance(REG_STATUS input1,REG_STATUS input2,int numBits);#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?