📄 materr.hpp
字号:
//defines error or warning messages
#ifndef __MATERR_HPP
#define __MATERR_HPP
#include "matdef.hpp"
/*
static const char *Merrorstring[ElastError]=
{
"[[error in error reporting ????]]",
"the dimension is negative",
"the dimensions of two matrix conflict",
"out of data range",
"the matrix is singular",
"iteration failure",
"data type error",
"the index out of define range",
"the divisor is close to zero",
"the method used has failed",
"the data has no definition" ,
"the condition is infinite",
"the method has not been defined",
"capacity exceeded in construction",
"function need a square matrix"
};
*/
//WARNING !! the sequence of next strings is in reverse order of
// enum Marvec_warnings !!
static const char *Mwarningstring[-WlastWarning]=
{
"[[Warning in warning reporting ????]]",
"condition is too large,the result may be invaliable",
"norm is clear to zero, result is inaccurate",
"matrix is near singular, inv() result is inaccurate"
};
#ifndef _Windows
static const char *VinPrompt[5]=
{
"the input prompt information for every type of vector!\n",
"this is a int vector. every input element is separated with space!\n",
"this is a float vector. every input element is separated with space!\n",
"this is a double vector. every input element is separated with space!\n",
"this is a complex vector. the input format of complex element is:\n\
'(real,imaginary)'. every input element is separated with space!\n"
};
static const char *MinPrompt[5]=
{
"the input prompt information for every type of matrix!\n",
"this is a int matrix. every input element is separated with space!\n",
"this is a float matrix. every input element is separated with space!\n",
"this is a double matrix. every input element is separated with space!\n",
"this is a complex matrix. the input format of complex element is:\n\
'(real,imaginary)'. every input element is separated with space!\n"
};
#endif
/*
static void _Cdecl _FARFUNC matvec_new_error(void);
void _Cdecl _FARFUNC matvec_new_error(void)
{
#ifndef _Windows
cout<< endl << "Fatal error from matvec library:"
<<"Memory allocate error!" << endl;
exit( EXIT_FAILURE );
#else
char errMsg[]="Memory Allocate Error!";
char _FAR *progName = strrchr(_argv0, '\\');
if (progName == NULL)
progName = _argv0;
else
progName++; // skip backslash in front of name
char tmp[81];
sprintf(tmp,"ERROR FROM %s%c",progName,'\0');
MessageBox(GetDesktopWindow(), errMsg, tmp,
MB_ICONHAND | MB_SYSTEMMODAL);
_exit(EXIT_FAILURE);
#endif
}
*/
#endif //__MATERR_HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -