⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 proto.h

📁 Relief的C++程序
💻 H
字号:
// PROTO.h: interface for the PROTO class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROTO_H__D8A951BF_4673_4756_9602_56A08FAE9EF8__INCLUDED_)
#define AFX_PROTO_H__D8A951BF_4673_4756_9602_56A08FAE9EF8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef unsigned long ULONG;
typedef          char CHAR;
#include "excel.h"
typedef double        REAL;

typedef struct node {
   UINT idx; /* ID code for attribute */
   REAL threshold; /* Numerical threshold for attribute test */
   struct node *on; /* Address of 'on' node */
   struct node *off; /* Address of 'off' node */
   struct node *parent; /* Addess of parent node */
} NODE;

typedef struct ne_struct {
    REAL ne;
    UINT status;
} NEGENTROPY;
typedef struct mysort_struct {
    REAL genedata;
    int index;
} Mysort;
typedef struct matrix {
   UINT width;
   UINT height;
   REAL **data;
} MATRIX;
class PROTO  
{
public:
	void Relief(MATRIX *matrix, UINT x, UINT y, UINT target, UINT K);
	MATRIX * ReadFormExcel(CString filename,UINT *width, UINT *height);
	void bubble( Mysort*buff,int len);
	PROTO();
	int normal;
	int unnormal;
	virtual ~PROTO();
	 REAL *hit1;
	 REAL *hit;

	_Application       m_ExcelApp;           // 定义Excel应用程序
	Workbooks          m_wbsBooks;
	_Workbook          m_wbBook;
	Worksheets         m_wssSheets; 
	_Worksheet         m_wsSheet;



enum UINT1 { INACTIVE, OFF, ON };
#define LN_2 0.693147180559945309417
#define entropy(x) (x > 0 ? x * log(x) / LN_2 : 0.0)
NEGENTROPY negentropy ( REAL **, UINT, NODE*, UINT );
void print_tree ( NODE* , CHAR** );
void free_tree ( NODE  * );
NODE* ID3 ( MATRIX * , NODE* , UINT , UINT );
void err_exit ( CHAR* , UINT );
MATRIX *build_matrix ( UINT, UINT );
void free_matrix ( MATRIX * );
void read_matrix ( CHAR *, MATRIX * );
void file_size ( CHAR * , UINT * , UINT * );
CHAR **read_tags ( CHAR * , UINT );
void free_tags ( CHAR **, UINT);

};

#endif // !defined(AFX_PROTO_H__D8A951BF_4673_4756_9602_56A08FAE9EF8__INCLUDED_)

⌨️ 快捷键说明

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