摘要:
//哈夫曼编码算法 2009-06-05 13:10:22 //分类: C/C++#include #include #include #include #include "string.h"#ifndef __HUFFMAN_H_FE#define __HUFFMAN_H_FE// 哈夫曼树的节点结构typedef struct _huff_node { float weight; // 节点权重 int lchild; // 节点的左孩子 int rchild; // ... 阅读全文
摘要:
#include "stdio.h"#include "stdlib.h"#define OVERFLOW -1#define ERROR -1#define OK 1typedef char Elemtype;typedef int Status;typedef struct BitNode{ Elemtype data; struct BitNode *lchild,*rchild;}bitnode ,*Bitree;int postion(Elemtype ch,Elemtype a[],int start,int end){ int i; for 阅读全文
摘要:
#include "stdio.h"#include "stdlib.h"#define OVERFLOW -1#define ERROR -1#define OK 1typedef char Elemtype;typedef int Status;typedef struct BitNode{ Elemtype data; struct BitNode *lchild,*rchild;}bitnode ,*Bitree;int postion(Elemtype ch,Elemtype a[],int start,int end){ int i; for 阅读全文