math_util.h
来自「这是关于覆盖网的各种负载均衡算法的程序。好好研究」· C头文件 代码 · 共 32 行
H
32 行
/* $Id: math_util.h,v 1.6 2005/08/02 19:35:49 jonathan Exp $ * Jonathan Ledlie, Harvard University. * Copyright 2005. All rights reserved. */#ifndef MATH_UTIL_H#define MATH_UTIL_H//#include <sunmath.h>#include <vector>#include <math.h>using namespace::std;#define Long long long//#define drand48() ((double)rand()/RAND_MAX)#define Rand() drand48()#define SRand(c) srand48(c)#define ABS(x) ((x > 0) ? x : -1*x)double randPct ();int poisson (int mean);double poisson (double mean);int unifRand (int a, int b);double mean (vector<double> v);double stddev (vector<double> v, double mean);double square (double x);#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?