defs.hh

来自「COOOL:CWP面向对象最优化库(CWP Object Oriented Op」· HH 代码 · 共 54 行

HH
54
字号
#ifndef DEFS_H#define DEFS_H#ifndef GLIB#define GLIB#include <iostream.h>#include <fstream.h>#include <stdlib.h>#include <stdio.h>#include <stddef.h>#include <assert.h>#include <math.h>#include <string.h>#endif// DEFINE simple constants#ifndef Pi#define Pi (3.141592653589793)#endif#ifndef True#define True (1)#endif#ifndef False#define False (0)#endif#ifndef Yes#define Yes (1)#endif#ifndef No#define No (0)#endif//Define some simple template functions#ifndef Sgn#define Sgn(x) ((x) < 0 ? -1.0 : 1.0)#endif#ifndef Abs#define Abs(x) ((x) < 0 ? -(x) : (x))#endif#ifndef Max#define Max(x,y) ((x) > (y) ? (x) : (y))#endif#ifndef Min#define Min(x,y) ((x) < (y) ? (x) : (y))#endif#ifndef inValidSize#define inValidSize() cerr<<"Warning: incompatible sizes!"<<endl;#endif#endif

⌨️ 快捷键说明

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