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

📄 matdef.hpp

📁 基于线性规划的回归支持向量机源程序
💻 HPP
字号:
//defines the constants which will be used in vector or matrix classes

#ifndef __MATDEF_HPP
#define __MATDEF_HPP
#include <fstream.h>
#include <strstrea.h>
#include <new.h>

//#if defined(_Windows)
//#   include <windows.h>
//#endif


	#include <float.h>
	#include <string.h>
	#include <stdio.h>
	#include <math.h>
	#include <process.h>
	#include <stdlib.h>
	#include <limits.h>


//#if defined(__DLL__)
//#   undef _FARFUNC
//#   define _FARFUNC _export
//#endif

#ifndef __MINMAX
#define __MINMAX
#define MIN(a,b) ((a)<(b)) ? (a): (b)
#define MAX(a,b) ((a)<(b)) ? (b): (a)
#endif


//defines constant for overflow determination
#define DOUBLE_MAX		  DBL_MAX

//defines constant for singular determination
#define DOUBLE_EPSILON    DBL_EPSILON

#define TOLERANT_ERROR    1.0e-12     //admissable iteration error

#define MAX_ITERATETIME   30          //the maximum iteration times

enum Matvec_errors
{
	FirstError,          //default is 0, used to delimite the normal situation
	EMAT_INVALIDSIZE,    //default is 1
	EMAT_INVALIDORDER,   //default is EMAT_INVALIDSIZE+1=2
	EMAT_OVERFLOW,
	EMAT_SINGULAR,
	EMAT_OVERITERATE,
	EMAT_ASSIGNDATAERR,
	EMAT_OUTOFRANGE,
	EMAT_DIVBYZERO,
	EMAT_FAILURE,
	EMAT_NOTNUMBER,
	EMAT_INFINITECOND,
	EMAT_NODEFINE,
	EMAT_EXCEEDCAPACITY,
	EMAT_NOTSQUARE,
	ElastError                  //used to define array Merrorstring
};


enum Matvec_warnings
{
	WlastWarning=-4,            //used to define array Mwarningstring
	WEMAT_SINGULAR,
	WEMAT_SMALLNORM,
	WEMAT_LARGECONDITION,
	WfirstWarning
};

#endif //__MATDEF_HPP

⌨️ 快捷键说明

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